Commit 21e4fdbb by 宋毅

tj

parent dff4ebe0
...@@ -57,7 +57,7 @@ module.exports = { ...@@ -57,7 +57,7 @@ module.exports = {
//附件类型 //附件类型
"stuff_type": { "csty": "彩色图样", "wts": "委托书", "gzwts": "盖章委托书", "ty": "图样", "sywj": "声音文件", "smwj": "说明文件" }, "stuff_type": { "csty": "彩色图样", "wts": "委托书", "gzwts": "盖章委托书", "ty": "图样", "sywj": "声音文件", "smwj": "说明文件" },
//来源类型 //来源类型
"source_type": { "order": "订单", "expensevoucher": "费用单", "receiptvoucher": "收款单", "refundvoucher": "退款单", "trademark": "商标单" }, "source_type": { "childorders": "子订单","expensevoucher": "费用单" },
//审核状态 //审核状态
"audit_status": { "dsh": "待审核", "btg": "不通过", "tg": "通过" }, "audit_status": { "dsh": "待审核", "btg": "不通过", "tg": "通过" },
//收款类型 //收款类型
......
...@@ -5,6 +5,7 @@ module.exports = (db, DataTypes) => { ...@@ -5,6 +5,7 @@ module.exports = (db, DataTypes) => {
return db.define("childorders", { return db.define("childorders", {
uapp_id :DataTypes.INTEGER,// uapp_id :DataTypes.INTEGER,//
sourceOrderNo: DataTypes.STRING(64), // 来源单号 sourceOrderNo: DataTypes.STRING(64), // 来源单号
childOrderNo :DataTypes.STRING(64),// 子订单号
appPayType :{ appPayType :{
type: DataTypes.ENUM, type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.app_pay_type), values: Object.keys(uiconfig.config.pdict.app_pay_type),
...@@ -23,7 +24,12 @@ module.exports = (db, DataTypes) => { ...@@ -23,7 +24,12 @@ module.exports = (db, DataTypes) => {
opPayType :DataTypes.STRING(10),// 操作付款类型:00: 收款, 10: 退款 opPayType :DataTypes.STRING(10),// 操作付款类型:00: 收款, 10: 退款
accountType: { accountType: {
//帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它" //帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
type: DataTypes.STRING, type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.pay_account_type),
set: function (val) {
this.setDataValue("accountType", val);
this.setDataValue("accountTypeName", uiconfig.config.pdict.pay_account_type[val]);
}
}, },
accountTypeName: {//帐户类型名称 accountTypeName: {//帐户类型名称
type: DataTypes.STRING, type: DataTypes.STRING,
...@@ -31,9 +37,22 @@ module.exports = (db, DataTypes) => { ...@@ -31,9 +37,22 @@ module.exports = (db, DataTypes) => {
wxPayOrderCode: DataTypes.STRING(50),//业务微信支付订单号 wxPayOrderCode: DataTypes.STRING(50),//业务微信支付订单号
aliPayOrderCode: DataTypes.STRING(50),//业务支付宝支付订单号 aliPayOrderCode: DataTypes.STRING(50),//业务支付宝支付订单号
busPayOrderCode: DataTypes.STRING(50),//业务支付订单号 busPayOrderCode: DataTypes.STRING(50),//业务支付订单号
auditStatusName: {
type: DataTypes.STRING(50),
defaultValue: "待审核",
},
auditStatus: {//审核状态"dsh": "待审核", "btg": "不通过", "tg": "通过"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.audit_status),
set: function (val) {
this.setDataValue("auditStatus", val);
this.setDataValue("auditStatusName", uiconfig.config.pdict.audit_status[val]);
},
defaultValue: "dsh",
},
notes :DataTypes.STRING,// 备注 notes :DataTypes.STRING,// 备注
}, { }, {
paranoid: false,//假的删除 paranoid: true,//假的删除
underscored: true, underscored: true,
version: true, version: true,
freezeTableName: true, freezeTableName: true,
......
...@@ -12,7 +12,7 @@ module.exports = (db, DataTypes) => { ...@@ -12,7 +12,7 @@ module.exports = (db, DataTypes) => {
defaultValue: false, defaultValue: false,
}, },
}, { }, {
paranoid: false,//假的删除 paranoid: true,//假的删除
underscored: true, underscored: true,
version: true, version: true,
freezeTableName: true, freezeTableName: true,
......
...@@ -12,7 +12,7 @@ module.exports = (db, DataTypes) => { ...@@ -12,7 +12,7 @@ module.exports = (db, DataTypes) => {
fax :DataTypes.STRING(50), // fax :DataTypes.STRING(50), //
}, { }, {
paranoid: false,//假的删除 paranoid: true,//假的删除
underscored: true, underscored: true,
version: true, version: true,
freezeTableName: true, freezeTableName: true,
......
...@@ -29,7 +29,7 @@ module.exports = (db, DataTypes) => { ...@@ -29,7 +29,7 @@ module.exports = (db, DataTypes) => {
opNotes :DataTypes.STRING,// 备注 opNotes :DataTypes.STRING,// 备注
notes :DataTypes.STRING,// 备注 notes :DataTypes.STRING,// 备注
}, { }, {
paranoid: false,//假的删除 paranoid: true,//假的删除
underscored: true, underscored: true,
version: true, version: true,
freezeTableName: true, freezeTableName: true,
......
...@@ -16,7 +16,7 @@ module.exports = (db, DataTypes) => { ...@@ -16,7 +16,7 @@ module.exports = (db, DataTypes) => {
proPrice :DataTypes.DOUBLE, // 产品价格 proPrice :DataTypes.DOUBLE, // 产品价格
serviceItemSnapshot :DataTypes.TEXT, //产品快照 serviceItemSnapshot :DataTypes.TEXT, //产品快照
}, { }, {
paranoid: false,//假的删除 paranoid: true,//假的删除
underscored: true, underscored: true,
version: true, version: true,
freezeTableName: true, freezeTableName: true,
......
...@@ -5,41 +5,30 @@ module.exports = (db, DataTypes) => { ...@@ -5,41 +5,30 @@ module.exports = (db, DataTypes) => {
return db.define("moneyjourney", { return db.define("moneyjourney", {
uapp_id: DataTypes.INTEGER, // uapp_id: DataTypes.INTEGER, //
sourceOrderNo: DataTypes.STRING(64), // 来源单号 sourceOrderNo: DataTypes.STRING(64), // 来源单号
childOrderNo: DataTypes.STRING(64),// 子订单号
// //订单流程表引用用户信息 channelUserId: DataTypes.STRING(64), // 渠道用户ID
// this.db.models.moneyjourney.belongsTo(this.db.models.user, { as: 'createuser', constraints: false, }); ownerUserId: DataTypes.STRING(20),// 拥有渠道用户ID
// this.db.models.moneyjourney.belongsTo(this.db.models.company, { as: 'createcompany', constraints: false, });//创建收款单的公司
//基类 code: 账单号(自动生成)
//基类 name: ---暂时没有用
accountType: { accountType: {
//帐户类型:"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它" //帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
type: DataTypes.ENUM, type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.accountType), values: Object.keys(uiconfig.config.pdict.pay_account_type),
set: function (val) { set: function (val) {
this.setDataValue("accountType", val); this.setDataValue("accountType", val);
this.setDataValue("accountTypeName", uiconfig.config.pdict.accountType[val]); this.setDataValue("accountTypeName", uiconfig.config.pdict.pay_account_type[val]);
}, }
defaultValue: "wx",
}, },
accountTypeName: {//帐户类型名称 accountTypeName: {//帐户类型名称
type: DataTypes.STRING, type: DataTypes.STRING,
defaultValue: "微信",
}, },
directionTypeName: DataTypes.STRING, directionTypeName: DataTypes.STRING,
directionType: {//凭单类型,"sr": "收","zc": "支" directionType: {//凭单类型,"sr": "收","zc": "支"
type: DataTypes.ENUM, type: DataTypes.STRING,
values: Object.keys(uiconfig.config.pdict.direction_type),
set: function (val) {
this.setDataValue("directionType", val);
this.setDataValue("directionTypeName", uiconfig.config.pdict.direction_type[val]);
}
}, },
voucherDate: DataTypes.DATE,//凭单时间 voucherDate: DataTypes.DATE,//凭单时间
recvAmount: DataTypes.DECIMAL(12, 3),//收总额 recvAmount: DataTypes.DECIMAL(12, 3),//收总额
payAmount: DataTypes.DECIMAL(12, 3),//支总额 payAmount: DataTypes.DECIMAL(12, 3),//支总额
sourceTypeName: DataTypes.STRING, sourceTypeName: DataTypes.STRING,
sourceType: {//来源类型 "order": "订单","expensevoucher": "费用单","receiptvoucher": "收款单", "trademark": "商标单" sourceType: {//来源类型 "childorders": "子订单","expensevoucher": "费用单"
type: DataTypes.ENUM, type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.source_type), values: Object.keys(uiconfig.config.pdict.source_type),
set: function (val) { set: function (val) {
...@@ -47,7 +36,6 @@ module.exports = (db, DataTypes) => { ...@@ -47,7 +36,6 @@ module.exports = (db, DataTypes) => {
this.setDataValue("sourceTypeName", uiconfig.config.pdict.source_type[val]); this.setDataValue("sourceTypeName", uiconfig.config.pdict.source_type[val]);
} }
}, },
sourceOrderNo: DataTypes.STRING,//来源单号
auditStatusName: { auditStatusName: {
type: DataTypes.STRING(50), type: DataTypes.STRING(50),
defaultValue: "待审核", defaultValue: "待审核",
...@@ -63,11 +51,6 @@ module.exports = (db, DataTypes) => { ...@@ -63,11 +51,6 @@ module.exports = (db, DataTypes) => {
}, },
notes: DataTypes.STRING,//备注 notes: DataTypes.STRING,//备注
opNotes: DataTypes.STRING,//操作备注 opNotes: DataTypes.STRING,//操作备注
payOrderNo: DataTypes.STRING,//支付凭证流水单号,如:微信支付凭证单号
busPayOrderCode: DataTypes.STRING(100),//业务支付订单号
buyerOpenId: DataTypes.STRING,//用户在商户appid下的唯一标识或买家在支付宝的用户id
passTradeNo: DataTypes.STRING,//通道的统一订单号
buyerAliLogonId: DataTypes.STRING,//买家支付宝账号
}, { }, {
paranoid: true,//假的删除 paranoid: true,//假的删除
underscored: true, underscored: true,
......
...@@ -5,20 +5,8 @@ module.exports = (db, DataTypes) => { ...@@ -5,20 +5,8 @@ module.exports = (db, DataTypes) => {
return db.define("orderreceiptvoucher", {//收款单: return db.define("orderreceiptvoucher", {//收款单:
uapp_id: DataTypes.INTEGER, // uapp_id: DataTypes.INTEGER, //
sourceOrderNo: DataTypes.STRING(64), // 来源单号 sourceOrderNo: DataTypes.STRING(64), // 来源单号
childOrderNo :DataTypes.STRING(64),// 子订单号
busPayOrderCode: DataTypes.STRING(100),//业务支付订单号 busPayOrderCode: DataTypes.STRING(100),//业务支付订单号
payOrderNo: DataTypes.STRING, //支付凭证流水单号,如:微信支付凭证单号
receiptTypeName: DataTypes.STRING,
receiptType: {//收款类型,"sk": "收款","csrz": "初始入账" ,"ptdsk": "平台代收款"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.receipt_type),
set: function (val) {
this.setDataValue("receiptType", val);
this.setDataValue("receiptTypeName", uiconfig.config.pdict.receipt_type[val]);
}
},
accountType: { accountType: {
//帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它" //帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
type: DataTypes.ENUM, type: DataTypes.ENUM,
...@@ -26,22 +14,33 @@ module.exports = (db, DataTypes) => { ...@@ -26,22 +14,33 @@ module.exports = (db, DataTypes) => {
set: function (val) { set: function (val) {
this.setDataValue("accountType", val); this.setDataValue("accountType", val);
this.setDataValue("accountTypeName", uiconfig.config.pdict.pay_account_type[val]); this.setDataValue("accountTypeName", uiconfig.config.pdict.pay_account_type[val]);
}, }
defaultValue: "other",
}, },
accountTypeName: {//帐户类型名称 accountTypeName: {//帐户类型名称
type: DataTypes.STRING, type: DataTypes.STRING,
defaultValue: "其它",
}, },
auditStatusName: {
type: DataTypes.STRING(50),
defaultValue: "待审核",
},
auditStatus: {//审核状态"dsh": "待审核", "btg": "不通过", "tg": "通过"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.audit_status),
set: function (val) {
this.setDataValue("auditStatus", val);
this.setDataValue("auditStatusName", uiconfig.config.pdict.audit_status[val]);
},
defaultValue: "dsh",
},
payDate: DataTypes.DATE,//支付时间 payDate: DataTypes.DATE,//支付时间
totalSum: DataTypes.DECIMAL(12, 3),//订单总额(平台费用+服务费+官费+发票税费+个人利润+平台利润) totalSum: DataTypes.DECIMAL(12, 3),//订单总额(平台费用+服务费+官费+发票税费+个人利润+平台利润)
certifyFileUrl: DataTypes.STRING(500), //证明文件Url certifyFileUrl: DataTypes.STRING(500), //证明文件Url
notes: DataTypes.STRING,//备注 payOrderNo: DataTypes.STRING, //支付凭证流水单号,如:微信支付凭证单号
itemCode: DataTypes.STRING(100),//项目操作码 buyerOpenId: DataTypes.STRING,//用户在支付商户appid下的唯一标识或买家在支付宝的用户id
itemName: DataTypes.STRING(100),//项目名称
buyerOpenId: DataTypes.STRING,//用户在商户appid下的唯一标识或买家在支付宝的用户id
passTradeNo: DataTypes.STRING,//通道的统一订单号 passTradeNo: DataTypes.STRING,//通道的统一订单号
buyerAliLogonId: DataTypes.STRING,//买家支付宝账号 buyerAliLogonId: DataTypes.STRING,//买家支付宝账号
notes: DataTypes.STRING,//备注
opNotes: DataTypes.STRING,//操作备注
}, { }, {
paranoid: true,//假的删除 paranoid: true,//假的删除
underscored: true, underscored: true,
......
...@@ -5,30 +5,8 @@ module.exports = (db, DataTypes) => { ...@@ -5,30 +5,8 @@ module.exports = (db, DataTypes) => {
return db.define("orderrefundvoucher", {//退款单: return db.define("orderrefundvoucher", {//退款单:
uapp_id: DataTypes.INTEGER, // uapp_id: DataTypes.INTEGER, //
sourceOrderNo: DataTypes.STRING(64), // 来源单号 sourceOrderNo: DataTypes.STRING(64), // 来源单号
childOrderNo :DataTypes.STRING(64),// 子订单号
//基类 code: 退款单号(自动生成)
//基类 creator: 创建者
//基类 updator:/更新者
//基类 auditor: 审核者
//基类 opNotes: 操作备注
//基类 auditStatusName: //审核状态名称
//基类 auditStatus: //审核状态:ENUM=audit_status,"dsh": "待审核", "btg": "不通过", "tg": "通过"
//基类 sourceTypeName: //来源类型名称
//基类 sourceType: //来源类型:ENUM=source_type,"order": "订单","expensevoucher": "费用单","receiptvoucher": "收款单","refundvoucher": "退款单", "trademark": "商标单"
//基类 sourceOrderNo: DataTypes.STRING,//来源单号(如:订单号等)
//基类 channelServiceNo //渠道服务单号
payuser_id: DataTypes.INTEGER,//
busPayOrderCode: DataTypes.STRING(100),//业务支付订单号 busPayOrderCode: DataTypes.STRING(100),//业务支付订单号
payOrderNo: DataTypes.STRING, //支付凭证流水单号,如:微信支付凭证单号
refundTypeName: DataTypes.STRING,
refundType: {//退款类型,"tk": "退款" ,"ptdtk": "平台代退款"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.refund_type),
set: function (val) {
this.setDataValue("receiptType", val);
this.setDataValue("receiptTypeName", uiconfig.config.pdict.refund_type[val]);
}
},
accountType: { accountType: {
//帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它" //帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
type: DataTypes.ENUM, type: DataTypes.ENUM,
...@@ -36,22 +14,33 @@ module.exports = (db, DataTypes) => { ...@@ -36,22 +14,33 @@ module.exports = (db, DataTypes) => {
set: function (val) { set: function (val) {
this.setDataValue("accountType", val); this.setDataValue("accountType", val);
this.setDataValue("accountTypeName", uiconfig.config.pdict.pay_account_type[val]); this.setDataValue("accountTypeName", uiconfig.config.pdict.pay_account_type[val]);
}, }
defaultValue: "other",
}, },
accountTypeName: {//帐户类型名称 accountTypeName: {//帐户类型名称
type: DataTypes.STRING, type: DataTypes.STRING,
defaultValue: "其它", },
auditStatusName: {
type: DataTypes.STRING(50),
defaultValue: "待审核",
},
auditStatus: {//审核状态"dsh": "待审核", "btg": "不通过", "tg": "通过"
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.audit_status),
set: function (val) {
this.setDataValue("auditStatus", val);
this.setDataValue("auditStatusName", uiconfig.config.pdict.audit_status[val]);
},
defaultValue: "dsh",
}, },
payDate: DataTypes.DATE,//支付时间 payDate: DataTypes.DATE,//支付时间
totalSum: DataTypes.DECIMAL(12, 3),//订单总额(平台费用+服务费+官费+发票税费+个人利润+平台利润) totalSum: DataTypes.DECIMAL(12, 3),//订单总额(平台费用+服务费+官费+发票税费+个人利润+平台利润)
certifyFileUrl: DataTypes.STRING(500), //证明文件Url certifyFileUrl: DataTypes.STRING(500), //证明文件Url
notes: DataTypes.STRING,//备注 payOrderNo: DataTypes.STRING, //支付凭证流水单号,如:微信支付凭证单号
itemCode: DataTypes.STRING(100),//项目操作码 buyerOpenId: DataTypes.STRING,//用户在支付商户appid下的唯一标识或买家在支付宝的用户id
itemName: DataTypes.STRING(100),//项目名称
buyerOpenId: DataTypes.STRING,//用户在商户appid下的唯一标识或买家在支付宝的用户id
passTradeNo: DataTypes.STRING,//通道的统一订单号 passTradeNo: DataTypes.STRING,//通道的统一订单号
buyerAliLogonId: DataTypes.STRING,//买家支付宝账号 buyerAliLogonId: DataTypes.STRING,//买家支付宝账号
notes: DataTypes.STRING,//备注
opNotes: DataTypes.STRING,//操作备注
}, { }, {
paranoid: true,//假的删除 paranoid: true,//假的删除
underscored: true, underscored: true,
......
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