Merge branch 'couponV2.0' of codeup.aliyun.com:5f9118049cffa29cfdd3be1c/marketing/frontend into couponV2.0

This commit is contained in:
wangsongsole 2022-10-14 13:54:51 +08:00
commit 1244f03fa7
3 changed files with 12 additions and 7 deletions

View File

@ -98,14 +98,14 @@ const tableColumn = [
},
{
title: "有效时间段",
width: "575px",
width: "300px",
name: "effectDate",
prop: "effectDate",
type: "normal",
},
{
title: "创建时间",
width: "575px",
width: "350px",
name: "create_time",
prop: "create_time",
type: "normal",
@ -124,12 +124,19 @@ const tableColumn = [
type: "normal",
width: "auto",
},
{
title: "",
name: "",
prop: "",
type: "",
width: "",
},
{
title: "操作",
name: "opearo",
prop: "opearo",
type: "slot",
width: "200px",
width: "auto",
},
];

View File

@ -70,7 +70,7 @@ const tableColumn = [
},
{
title: "有效时间段",
width: "575px",
width: "350px",
prop: "effectDate",
name: "effectDate",
type: "normal",

View File

@ -1,5 +1,3 @@
import { divNum } from "./number";
// 立减金对象重构
export const knockGoldFun = (item) => {
let table_obj = {};
@ -11,7 +9,7 @@ export const knockGoldFun = (item) => {
table_obj.product_name = item.batch_goods_name; // 商品名
table_obj.official_price = item.reduce_amount; // 官方价
table_obj.contract_price = item.price; // 合同价格
table_obj.quantity = divNum(item.all_budget, item.reduce_amount); // 库存数量
table_obj.quantity = Math.trunc(item.all_budget / item.reduce_amount); // 库存数量
table_obj.channel_activity_id = item.channel_activity_id; // 批次号
table_obj.all_budget = Number(item.all_budget); // 总预算
table_obj.effectDate = `${item.time_limit.effect_time.start_time}${item.time_limit.effect_time.end_time}`; // 有效时间段