From 5e03572e514880198c0384bc754f2983d91ddb0a Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Tue, 27 Feb 2024 10:53:49 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=80=EF=B8=8F=20fix:=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=97=B6=E9=97=B4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/combining/index.jsx | 7 +++++++ src/components/combining/static.js | 4 ++-- src/pages/exchangecode/combiningAdd/index.jsx | 11 ++++------- src/pages/exchangecode/combiningAdd/utils.js | 7 ++----- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/components/combining/index.jsx b/src/components/combining/index.jsx index e97d70e7..3bc82993 100644 --- a/src/components/combining/index.jsx +++ b/src/components/combining/index.jsx @@ -660,6 +660,13 @@ const Combining = forwardRef((props, ref) => { if (com === "type") { return <>立减金 } + if (com == "effectDate") { + return ( + <> + {info.date_time[0]} 至 {info.date_time[1]} + + ) + } }} /> diff --git a/src/components/combining/static.js b/src/components/combining/static.js index 8d7b69fb..864a6345 100644 --- a/src/components/combining/static.js +++ b/src/components/combining/static.js @@ -36,10 +36,10 @@ export const tableColumn = [ }, { title: "有效时间段", - width: "350px", + width: "300px", prop: "effectDate", name: "effectDate", - type: "normal" + type: "slot" }, { title: "总预算", diff --git a/src/pages/exchangecode/combiningAdd/index.jsx b/src/pages/exchangecode/combiningAdd/index.jsx index 2325ac4c..af9ba528 100644 --- a/src/pages/exchangecode/combiningAdd/index.jsx +++ b/src/pages/exchangecode/combiningAdd/index.jsx @@ -1230,15 +1230,12 @@ export default class combiningAdd extends React.Component { }} ComponentHandler={(com, rowData) => { if (com == "type") { + return <>立减金 + } + if (com == "effectDate") { return ( <> - {rowData.type === 2 - ? "立减金" - : rowData.type === 3 - ? rowData.origin.cash_amount_type === "2" - ? "随机红包" - : "固额红包" - : "商品"} + {this.state.codeInfo.date_time[0]} 至 {this.state.codeInfo.date_time[1]} ) } diff --git a/src/pages/exchangecode/combiningAdd/utils.js b/src/pages/exchangecode/combiningAdd/utils.js index 65f454f7..32848b9e 100644 --- a/src/pages/exchangecode/combiningAdd/utils.js +++ b/src/pages/exchangecode/combiningAdd/utils.js @@ -75,10 +75,10 @@ export const Column2 = [ }, { title: "有效时间段", - width: "auto", + width: "300px", prop: "effectDate", name: "effectDate", - type: "normal" + type: "slot" }, { title: "当前成本价格", @@ -207,9 +207,6 @@ export function reductionFn(params) { newObj.edit = "edit" newObj.all_budget = params.all_budget newObj.send_num = params.send_num || 1 - newObj.effectDate = - params.effectDate || - params.time_limit?.effect_time.start_time + " 至 " + params.time_limit?.effect_time.end_time //有效时间 newObj.contract_price = params.contract_price || params.price //单价 newObj.official_price = params.official_price || params.reduce_amount //官方价 newObj.quantity = params.quantity || all //总库