Commit 2a8ed1d8 by 宋毅

tj

parent 01619c09
...@@ -4,10 +4,11 @@ const uiconfig = system.getUiConfig2(settings.appKey); ...@@ -4,10 +4,11 @@ const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => { module.exports = (db, DataTypes) => {
return db.define("productprice", { return db.define("productprice", {
product_id: DataTypes.INTEGER, //产品id product_id: DataTypes.INTEGER, //产品id
price:DataTypes.DOUBLE, //产品价格 pay_code: DataTypes.STRING(50), //支付编码
supply_price:DataTypes.DOUBLE, //供货价格 price: DataTypes.DOUBLE, //产品价格
service_charge:DataTypes.DOUBLE, //服务费 supply_price: DataTypes.DOUBLE, //供货价格
public_expense:DataTypes.DOUBLE, //官费 service_charge: DataTypes.DOUBLE, //服务费
public_expense: DataTypes.DOUBLE, //官费
channel_profit_rate: DataTypes.INTEGER, //渠道利润分成比例(百分比,主要分:产品价格-供货价格) channel_profit_rate: DataTypes.INTEGER, //渠道利润分成比例(百分比,主要分:产品价格-供货价格)
is_default: {//是否默认 is_default: {//是否默认
type: DataTypes.BOOLEAN, type: DataTypes.BOOLEAN,
......
...@@ -33,7 +33,7 @@ class ProductService extends ServiceBase { ...@@ -33,7 +33,7 @@ class ProductService extends ServiceBase {
} }
var pList = await this.productpriceDao.model.findAll({ var pList = await this.productpriceDao.model.findAll({
where: { product_id: item.id }, where: { product_id: item.id },
attributes: ["id", "price", "supply_price", "service_charge", "public_expense", "is_default", "price_type", "price_type_name", attributes: ["pay_code" "price", "supply_price", "service_charge", "public_expense", "is_default", "price_type", "price_type_name",
"sort", "price_desc", "min_qty", "max_qty" "sort", "price_desc", "min_qty", "max_qty"
], ],
raw: true raw: 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