Commit e35c04c2 by 王勇飞

gyq

parent 930f495f
......@@ -36,9 +36,12 @@ 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.business_type = element.business_type;//商机类型
robj.business_info_person = element.business_info.contactsName;//联系人
robj.v_coname = element.v_coname;//联系人-shousuo
robj.business_info_phone = element.business_info.contactsPhone;//联系电话
robj.v_cophone = element.v_cophone;//联系电话-shousuo
robj.business_status = element.business_status;//商机当前状态
if (element.business_info.serviceName && element.business_info.serviceName != 'undefined'){
robj.serviceName = element.business_info.serviceName;//服务地区
......@@ -131,7 +134,7 @@ class BizOptCtl extends CtlBase {
try {
await this.service.updateStatusByDemandCode(pobj);
await this.schemeService.updateStatusByDemandCode(pobj);//同时更新方案的状态
var res = this.service.findInfoByDemandCode(pobj);
var res = await this.service.findInfoByDemandCode(pobj);
if (res && res != 'undefined') {
var logInfo = {
"flowType": "BIZ",
......
......@@ -38,9 +38,11 @@ class DeliverybillCtl extends CtlBase {
let robj = {};
robj.id = element.id;//数据的id
robj.deliverNumber = element.delivery_code;//交付单编号
robj.delivery_code = element.delivery_code;//交付单编号-shousuo
robj.businessName = element.product_name;//产品名称
robj.businessType = element.product_code;//产品编码
robj.product_code = element.product_code;//产品编码
robj.product_name = element.product_name;//产品名称-shousuo
robj.product_code = element.product_code;//产品编码-shousuo
robj.sourceName = element.source_name;//渠道来源
robj.source_name = element.source_name;//渠道来源--前端服务
robj.channelNumber = element.source_number;//渠道编码
......@@ -82,13 +84,17 @@ class DeliverybillCtl extends CtlBase {
robj.relatedProducts = '无';
};
robj.payAmount = this.FenToYuan(element.selling_price);//交付单金额
robj.selling_price = this.FenToYuan(element.selling_price);//交付单金额-shousuo
robj.deliverStatus = element.delivery_status;//交付单状态
robj.delivery_status = element.delivery_status;//交付单状态
robj.delivery_status = element.delivery_status;//交付单状态-shousuo
robj.contactsName = robj.baseInfo.contactsName;//联系人
robj.contactsPhone = robj.baseInfo.contactsPhone;//联系电话
robj.v_coname = element.v_coname;//联系人-shousuo
robj.v_cophone = element.v_cophone;//联系电话-shousuo
robj.clerkName = element.salesman_name;//业务员名称
robj.clerkPhone = element.salesman_phone;//业务员电话
robj.createdTime = this.timeFormat(element.created_at);//交付单创建时间
robj.created_at = this.timeFormat(element.created_at);//交付单创建时间-shousuo
rarr.push(robj);
});
rs.results.rows = rarr;
......@@ -365,7 +371,7 @@ class DeliverybillCtl extends CtlBase {
}
if (j.status == 1 && j1status == 1) {
await this.service.updateStatusByDeliverCode(pobj);
var pInfo = this.service.findInfoByDeliverCode(pobj);
var pInfo = await this.service.findInfoByDeliverCode(pobj);
if (pInfo) {
var logInfo = {
"flowType": "DELIVERY",
......
......@@ -22,6 +22,14 @@ module.exports = (db, DataTypes) => {
allowNull: false,
type: DataTypes.JSON
},
v_coname: { // 联系人-虚拟字段
allowNull: true,
type: DataTypes.STRING
},
v_cophone: { // 联系电话-虚拟字段
allowNull: true,
type: DataTypes.STRING
},
source_number: { // 来源单号 (下单时产生的编号)
allowNull: true,
type: DataTypes.STRING
......
......@@ -22,6 +22,14 @@ module.exports = (db, DataTypes) => {
allowNull: true,
type: DataTypes.STRING
},
v_coname: { // 联系人-虚拟字段
allowNull: true,
type: DataTypes.STRING
},
v_cophone: { // 联系电话-虚拟字段
allowNull: true,
type: DataTypes.STRING
},
demand_code: {// 商机编号
allowNull: true,
type: DataTypes.STRING
......
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