From 99916f222f020e3d4b714a4807cd450582403211 Mon Sep 17 00:00:00 2001 From: zhangds Date: Fri, 14 Oct 2022 13:46:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dtable=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UseCouponAddEdit/index.jsx | 13 ++++++++++--- src/components/UseExchangeAddEdit/index.jsx | 2 +- src/tools/index.js | 4 +--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/components/UseCouponAddEdit/index.jsx b/src/components/UseCouponAddEdit/index.jsx index 6dc475e6..c5ff9f17 100644 --- a/src/components/UseCouponAddEdit/index.jsx +++ b/src/components/UseCouponAddEdit/index.jsx @@ -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", }, ]; diff --git a/src/components/UseExchangeAddEdit/index.jsx b/src/components/UseExchangeAddEdit/index.jsx index 14dd44c7..9f3704bc 100644 --- a/src/components/UseExchangeAddEdit/index.jsx +++ b/src/components/UseExchangeAddEdit/index.jsx @@ -70,7 +70,7 @@ const tableColumn = [ }, { title: "有效时间段", - width: "575px", + width: "350px", prop: "effectDate", name: "effectDate", type: "normal", diff --git a/src/tools/index.js b/src/tools/index.js index 0142590c..14bbe7d1 100644 --- a/src/tools/index.js +++ b/src/tools/index.js @@ -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}`; // 有效时间段