From 7afb11bc74773d125e658705514feb4fc3742e2b Mon Sep 17 00:00:00 2001 From: xuan Date: Thu, 23 Mar 2023 16:36:05 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(ID1000958):=20=E3=80=90?= =?UTF-8?q?=E9=A2=86=E5=8F=96=E8=89=B2=E5=8D=A1=E3=80=91=E5=BF=AB=E9=80=9F?= =?UTF-8?q?=E5=A4=87=E6=B3=A8=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【【领取色卡】快速备注文案】 https://www.tapd.cn/53459131/prong/stories/view/1153459131001000958 --- project.private.config.json | 7 ++ src/pages/customerEditor/index.tsx | 6 +- src/pages/getColorCard/addColorCard/index.tsx | 4 +- .../components/remark/index.module.scss | 108 ++++++++++-------- .../orderDetails/components/remark/index.tsx | 74 ++++++++++-- .../sampleCutting/addSampleCutting/index.tsx | 4 +- src/pages/submitOrder/index.tsx | 4 +- .../components/remark/index.module.scss | 94 +++++++-------- 8 files changed, 194 insertions(+), 107 deletions(-) diff --git a/project.private.config.json b/project.private.config.json index dfaaf7e..6166197 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -142,6 +142,13 @@ "query": "", "launchMode": "default", "scene": null + }, + { + "name": "", + "pathName": "pages/submitOrder/index", + "query": "purchaser_id=1861&sale_mode=0&shopping_cart_product_color_list=%5B75615%5D&purchaser_name=%E5%93%88%E5%96%BD", + "launchMode": "default", + "scene": null } ] } diff --git a/src/pages/customerEditor/index.tsx b/src/pages/customerEditor/index.tsx index b676e82..749f118 100644 --- a/src/pages/customerEditor/index.tsx +++ b/src/pages/customerEditor/index.tsx @@ -5,7 +5,7 @@ import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from ' import classnames from 'classnames' import Remark from '../orderDetails/components/remark' import styles from './index.module.scss' -import Form from './components/form' +import Form from './components/Form' import Popup from '@/components/popup' import { debounce } from '@/common/util' import { alert, goLink } from '@/common/common' @@ -370,7 +370,9 @@ const CustomerEditor = () => { {remarkDesc === '' ? '尚未备注信息' : remarkDesc} setShowDesc(false)}> - getRemark(e)} defaultValue={infoObj?.remark} showInput={!!showDesc} /> + { + showDesc && getRemark(e)} defaultValue={infoObj?.remark} /> + }
handleSetSite(val)} defaultValue={addressArr} addressOnClose={() => onClose()} show={showSiteModal} /> diff --git a/src/pages/getColorCard/addColorCard/index.tsx b/src/pages/getColorCard/addColorCard/index.tsx index 3fa2241..13de99a 100644 --- a/src/pages/getColorCard/addColorCard/index.tsx +++ b/src/pages/getColorCard/addColorCard/index.tsx @@ -382,7 +382,9 @@ const AddColorCard = () => { setShowDesc(false)}> - + { + showDesc && + } } diff --git a/src/pages/orderDetails/components/remark/index.module.scss b/src/pages/orderDetails/components/remark/index.module.scss index 036a4ce..61aa789 100644 --- a/src/pages/orderDetails/components/remark/index.module.scss +++ b/src/pages/orderDetails/components/remark/index.module.scss @@ -1,48 +1,62 @@ -.order_popup{ - display: flex; - flex-direction: column; - align-items: center; - padding: 20px 0; - .order_popup_title{ - color: $font_size_big; - font-weight: 700; - color: #000000; - padding-bottom: 20px; - } - .order_popup_input{ - width: 100%; - padding: 0 25px; - box-sizing: border-box; - margin-top: 43px; - position: relative; - .descDataNum{ - position: absolute; - right: 40px; - bottom: 10px; - height: 39px; - font-size: $font_size_medium; - color: $color_font_two; - } - textarea{ - background-color: #f3f3f3; - border-radius: 10px; - width: 100%; - height: 313px; - padding: 20px; - padding-bottom: 50px; - box-sizing: border-box; - font-size: $font_size; - border: 2px solid #e6e6e6; - } +.order_popup { + display: flex; + flex-direction: column; + align-items: center; + padding: 20px 0; + .order_popup_title { + color: $font_size_big; + font-weight: 700; + color: #000000; + padding-bottom: 20px; + } + .order_popup_input { + width: 100%; + padding: 0 25px; + box-sizing: border-box; + margin-top: 43px; + position: relative; + .descDataNum { + position: absolute; + right: 40px; + bottom: 10px; + height: 39px; + font-size: $font_size_medium; + color: $color_font_two; } - .order_save_address{ - height: 82px; - background: #007aff; - border-radius: 40px; - width: 668px; - text-align: center; - line-height: 82px; - color: #fff; - margin-top: 60px; - } -} \ No newline at end of file + + textarea { + background-color: #f3f3f3; + border-radius: 10px; + width: 100%; + height: 313px; + padding: 20px; + padding-bottom: 50px; + box-sizing: border-box; + font-size: $font_size; + border: 2px solid #e6e6e6; + } + } + .recommend_remark { + margin: 10px 28px; + color: #808080; + font-size: 28px; + } + .recommend_remark_content { + margin: 0 20px; + .tag { + height: 50px; + margin: 0 8px; + margin-bottom: 10px; + } + } + .order_save_address { + height: 82px; + background: #007aff; + border-radius: 40px; + width: 668px; + text-align: center; + line-height: 82px; + color: #fff; + margin-top: 60px; + } +} diff --git a/src/pages/orderDetails/components/remark/index.tsx b/src/pages/orderDetails/components/remark/index.tsx index 5ee6d7d..f2c031b 100644 --- a/src/pages/orderDetails/components/remark/index.tsx +++ b/src/pages/orderDetails/components/remark/index.tsx @@ -2,14 +2,57 @@ import { Textarea, View } from '@tarojs/components' import { useCallback, useEffect, useState } from 'react' import styles from './index.module.scss' import Popup from '@/components/popup' +import Tag from '@/components/tag' interface Param { onBlur?: (val: any) => void onSave?: (val: string) => void defaultValue?: string - showInput: boolean } -const Remark = ({ onBlur, onSave, defaultValue = '', showInput = false }: Param) => { +const recommendReport = [ + { + id: 1, + value: '拿色片', + }, + { + id: 2, + value: '顺丰', + }, + { + id: 3, + value: '客户自提', + }, + { + id: 4, + value: '加急一下', + }, + { + id: 5, + value: '物流到', + }, + { + id: 6, + value: '中台秀银', + }, + { + id: 7, + value: '中台晓茵', + }, + { + id: 8, + value: '中台淑婷', + }, + { + id: 9, + value: '中台结慧', + }, + { + id: 10, + value: '辛苦了', + }, +] + +const Remark = ({ onBlur, onSave, defaultValue = '' }: Param) => { const [descData, setDescData] = useState({ number: 0, value: '', @@ -30,16 +73,31 @@ const Remark = ({ onBlur, onSave, defaultValue = '', showInput = false }: Param) useEffect(() => { getDesc(defaultValue) }, [defaultValue]) + + const onClickTag = (item) => { + setDescData(prev => ({ + ...prev, + value: prev.value + item.value, + })) + } + return ( 编辑备注 - { - showInput && - - {descData.number}/{descData.count} + + + {descData.number}/{descData.count} + + + 推荐备注 + + { + recommendReport.map((item) => { + return onClickTag(item)} circle customClassName={styles.tag} key={item.id}>{item.value} + }) + } - } - + setSave()}>保存 ) diff --git a/src/pages/sampleCutting/addSampleCutting/index.tsx b/src/pages/sampleCutting/addSampleCutting/index.tsx index f233d2e..f0d67a6 100644 --- a/src/pages/sampleCutting/addSampleCutting/index.tsx +++ b/src/pages/sampleCutting/addSampleCutting/index.tsx @@ -450,7 +450,9 @@ const AddColorCard = () => { setShowDesc(false)}> - + { + showDesc && + } } diff --git a/src/pages/submitOrder/index.tsx b/src/pages/submitOrder/index.tsx index 924396f..0deb972 100644 --- a/src/pages/submitOrder/index.tsx +++ b/src/pages/submitOrder/index.tsx @@ -517,7 +517,9 @@ const SubmitOrder = () => { setShowDesc(false)}> - getRemark(e)} defaultValue={infoObj.remark} showInput={!!showDesc} /> + { + showDesc && getRemark(e)} defaultValue={infoObj.remark} /> + } ) diff --git a/src/pages/takeDelivery/components/remark/index.module.scss b/src/pages/takeDelivery/components/remark/index.module.scss index 036a4ce..a1320be 100644 --- a/src/pages/takeDelivery/components/remark/index.module.scss +++ b/src/pages/takeDelivery/components/remark/index.module.scss @@ -1,48 +1,48 @@ -.order_popup{ - display: flex; - flex-direction: column; - align-items: center; - padding: 20px 0; - .order_popup_title{ - color: $font_size_big; - font-weight: 700; - color: #000000; - padding-bottom: 20px; - } - .order_popup_input{ - width: 100%; - padding: 0 25px; - box-sizing: border-box; - margin-top: 43px; - position: relative; - .descDataNum{ - position: absolute; - right: 40px; - bottom: 10px; - height: 39px; - font-size: $font_size_medium; - color: $color_font_two; - } - textarea{ - background-color: #f3f3f3; - border-radius: 10px; - width: 100%; - height: 313px; - padding: 20px; - padding-bottom: 50px; - box-sizing: border-box; - font-size: $font_size; - border: 2px solid #e6e6e6; - } +.order_popup { + display: flex; + flex-direction: column; + align-items: center; + padding: 20px 0; + .order_popup_title { + color: $font_size_big; + font-weight: 700; + color: #000000; + padding-bottom: 20px; + } + .order_popup_input { + width: 100%; + padding: 0 25px; + box-sizing: border-box; + margin-top: 43px; + position: relative; + .descDataNum { + position: absolute; + right: 40px; + bottom: 10px; + height: 39px; + font-size: $font_size_medium; + color: $color_font_two; } - .order_save_address{ - height: 82px; - background: #007aff; - border-radius: 40px; - width: 668px; - text-align: center; - line-height: 82px; - color: #fff; - margin-top: 60px; - } -} \ No newline at end of file + textarea { + background-color: white; + border-radius: 10px; + width: 100%; + height: 313px; + padding: 20px; + padding-bottom: 50px; + box-sizing: border-box; + font-size: $font_size; + border: 2px solid #e6e6e6; + } + } + .order_save_address { + height: 82px; + background: #007aff; + border-radius: 40px; + width: 668px; + text-align: center; + line-height: 82px; + color: #fff; + margin-top: 60px; + } +}