Commit 8c5bf03e by 蒋勇

d

parent 89720cd0
......@@ -9,6 +9,12 @@ class DeliverybillDao extends Dao {
qc.raw = true;
//检查查询的用户所属公司是否是平台运营公司-1,如果是则不添加公司查询条件, 不添加路径条件,返回所有数据
if (qobj.company_id == 1) {
if (qobj.bizpath && qobj.bizpath != "") {
if (qobj.bizpath.indexOf("pmxdeliverrequest") > 0) {//说明是从商机列表过来的
qw["delivery_status"] = "success";
qw["settle_status"] = "waittosettle";
}
}
return qw
} else {
//需要添加公司查询条件
......@@ -27,7 +33,6 @@ class DeliverybillDao extends Dao {
qw["salesman_id"] = qobj.userid;
}
}
}
}
return qw;
......
......@@ -50,6 +50,11 @@ module.exports = (db, DataTypes) => {
allowNull: false,
type: DataTypes.STRING
},
settle_status: {// 服务单流转状态
allowNull: false,
type: DataTypes.STRING,
defaultValue:'waittosettle'
},
selling_price: {//售价
allowNull: false,
type: DataTypes.INTEGER
......
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
/**
* 交付单表
*/
module.exports = (db, DataTypes) => {
return db.define("settlebill", {
code: { //交付单编号
allowNull: true,
type: DataTypes.STRING
},
audit_status: {// 审核状态
allowNull: false,
type: DataTypes.STRING,
defaultValue:'waittoaudit'
},
settle_amount: {//结算金额
allowNull: true,
type: DataTypes.INTEGER
},
isPayed:{
type:DataTypes.BOOLEAN,
defaultValue: false
}
}, {
paranoid: true,//真的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'fi_settlebill',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
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