({
- reasonId: '',
- reasonName: '请选择',
- })
- // 选择退货原因
- const handReasonOne = (item) => {
- List.map((it) => {
- if (it.id === item.id) {
- it.default = true
- }
- else {
- it.default = false
- }
- return it
- })
- setList([...List])
- setQuery(val => ({ ...val, reasonId: item.id }))
- queryRef.current.reasonName = item.name
- }
-
- // 筛选内容展示
- const [showPopup, setshowPopup] = useState(false)
-
- // 备注信息
- const [TextareaValue, setTextareaValue] = useState('')
- const getDesc = (e) => {
- setTextareaValue(e)
- }
-
- // 取消返回
- const handCancl = () => {
- Taro.navigateBack({
- delta: 1,
- })
- }
-
- // 确认选择
- const handSlect = () => {
- setQuery(val => ({ ...val, reasonName: queryRef.current.reasonName }))
- setshowPopup(false)
- }
-
- const totalNums = useMemo(() => {
- const arr: any[] = []
- ListArr.forEach((item) => {
- item.av_product_color.forEach((it) => {
- if (it.isTui) {
- arr.push(it)
- }
- })
- })
- return arr.length
- }, [ListArr])
- // 数组重置
- const resetArr = (arr) => {
- arr.map((it) => {
- it.default = false
- return it
- })
- return arr
- }
- // 重置
- const handReset = () => {
- setQuery(({ reasonId: '', reasonName: '请选择' }))
- queryRef.current.reasonName = '请选择'
- const arrOne = resetArr(List)
- setList([...arrOne])
- }
-
- // 判断是否允许提交
- const isDisabled = useMemo(() => {
- if (Query.reasonId !== '') {
- return false
- }
- else {
- return true
- }
- }, [Query])
-
- // 判断是否允许提交
- const canTui = useMemo(() => {
- if (totalNums > 0 && Query.reasonId !== '') {
- return false
- }
- else {
- return true
- }
- }, [Query, totalNums])
-
- const noGoods = useMemo(() => {
- if (Query.reasonId !== '') {
- return false
- }
- else {
- return true
- }
- }, [Query])
- useEffect(() => {
- getDetail()
- getEnum()
- }, [])
-
- // 确认退款
- const { fetchData: sureFetch } = MpReturnApplyOrder()
- const handSure = () => {
- if (queryRef.current.reasonName == '其他问题' && TextareaValue == '') {
- Taro.showToast({
- title: '请填写其他说明',
- icon: 'error',
- duration: 3000,
- })
- return false
- }
- const arr: any = []
- if (infoObj.sale_mode == 0 && infoObj.status == 9) {
- ListArr.forEach((item) => {
- item.av_product_color.forEach((it) => {
- if (it.isTui) {
- arr.push({
- product_color_id: it.sale_mode == 0 ? it.product_color_id : '',
- product_id: it.sale_mode == 0 ? it.product_id : '',
- product_roll: it.sale_mode == 0 ? it.nums : 0,
- sale_order_detail_id: it.sale_order_detail_id,
- })
- }
- })
- })
- }
- if ((infoObj.sale_mode == 1 && infoObj.status == 9) || (infoObj.sale_mode == 2 && infoObj.status == 9)) {
- ListArr.forEach((item) => {
- item.av_product_color.forEach((it) => {
- if (it.isTui) {
- arr.push({
- product_color_id: it.product_color_id,
- product_id: it.product_id,
- product_roll: 0,
- sale_order_detail_id: it.sale_order_detail_id,
- })
- }
- })
- })
- }
- const query = {
- reason_describe: TextareaValue,
- fabric_piece_accessory_url: [],
- goods_status: 0,
- return_reason: 1,
- return_explain: Query.reasonId,
- roll: 0,
- roll_list: arr,
- sale_order_id: Number(Router.params.orderId),
- }
- console.log(query, 888)
- Taro.showModal({
- content: '确认退款吗?',
- confirmText: '确认',
- cancelText: '取消',
- async success(res) {
- if (res.confirm) {
- Taro.showLoading({
- title: '请稍等...',
- mask: true,
- })
- const res = await sureFetch(query)
- if (res?.msg === 'success') {
- Taro.showToast({
- title: '成功',
- })
- Taro.hideLoading()
- handCancl()
- }
- else {
- Taro.hideLoading()
- Taro.showToast({
- title: res?.msg,
- icon: 'error',
- })
- }
- }
- },
- })
- }
-
- const showItem = useMemo(() => {
- if ((infoObj.sale_mode == 0 && infoObj.status == 9) || (infoObj.sale_mode == 1 && infoObj.status == 9) || (infoObj.sale_mode == 2 && infoObj.status == 9)) {
- return true
- }
- else {
- return false
- }
- }, [infoObj])
-
- return (
-
- {
- showItem &&
- handTui(item)}
- handCancel={item => handCancel(item)}
- onBlur={(e, item) => onBlur(e, item)}
- handReduce={item => handReduce(item)}
- handAdd={item => handAdd(item)}
- onInputEven={(e, item) => onInputEven(e, item)}
- >
- 汇总:已选{totalNums}种商品
-
- }
-
- { setshowPopup(true) }}>
-
- 退款原因
- *
- {
- Query.reasonName === '请选择' && 请选择
- }
- {
- Query.reasonName !== '请选择' && {Query.reasonName}
- }
-
-
-
-
-
- 其他说明
-
-
-
-
-
-
-
-
- {
- showItem &&
-
- }
- {
- !showItem &&
-
- }
-
-
- { setshowPopup?.(false) }}>
-
-
-
- 退款原因
-
- {
- List.map((item, index) => {
- return (
- { handReasonOne(item) }} className={classnames(item.default ? styles.activemodeBox : styles.modeBox)} key={index}>{item.name}
- )
- })
- }
-
-
-
-
-
-
-
-
-
-
-
-
- )
-}
-export default ApplyMoney
diff --git a/src/pages/clauseDetail/index.config.ts b/src/pages/clauseDetail/index.config.ts
deleted file mode 100644
index 0d2f9ce..0000000
--- a/src/pages/clauseDetail/index.config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export default {
- navigationBarTitleText: '服务条款',
-}
diff --git a/src/pages/clauseDetail/index.module.scss b/src/pages/clauseDetail/index.module.scss
deleted file mode 100644
index 4f56732..0000000
--- a/src/pages/clauseDetail/index.module.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-.main {
- padding: 0 20px 50px 20px;
-}
diff --git a/src/pages/clauseDetail/index.tsx b/src/pages/clauseDetail/index.tsx
deleted file mode 100644
index aa4f5c0..0000000
--- a/src/pages/clauseDetail/index.tsx
+++ /dev/null
@@ -1,399 +0,0 @@
-import { RichText, View } from '@tarojs/components'
-import Taro, { useRouter } from '@tarojs/taro'
-import { useEffect } from 'react'
-import styles from './index.module.scss'
-
-const ClauseDetail = () => {
- const clause = `
- 版本更新日期:2022 年 2 月 10 日
- 版本生效日期:2023 年 2 月 11 日
- 本协议签订地:佛山市禅城区
- 重要须知:蜘蛛管家小程序及 APP 客户端(以下统称“蜘蛛管家平台”或“本平台”)所有权人及其关联方(下称“蜘蛛管家”)在此特别提醒您仔细阅读(未成年人应在其法定监护人的陪同下阅读)本《蜘蛛管家服务条款》(下称“本协议”)中的各个条款,尤其是以粗体并下划线标示的条款,包括但不限于免除或者限制蜘蛛管家责任的条款、对用户权利进行限制的条款以及约定争议解决方式、司法管辖的条款。您有权 选择同意或者不同意本协议。
- 您与蜘蛛管家均应当严格履行本协议及其补充协议所约定的各项义务,如发生争议或者纠纷,双方可以友好协商解决;协商不成的,任何一方均可向佛山互联网法院提起诉讼。本协议签订地为佛山市禅城区。
- 您如果通过登录蜘蛛管家平台用户注册页面或者蜘蛛管家提供的其他用户注册渠道注册用户账号,完成我们的注册流程并通过点击同意的形式在线签署以下协议即视为您完全同意本协议,愿意接受本协议所有及任何条款的约束。
- 1. 名词解释
- 除您与蜘蛛管家另有约定外,本协议及其补充协议当中的下列名词均采用如下解释:
- 1.1 蜘蛛管家服务条款:即本协议,指您与蜘蛛管家当下订立的旨在约定您登录、使用本平台,以及通过本平台下达订单、购买商品、支付货款、收取商品等整个网购过程中,您与蜘蛛管家之间的权利、义务的书面合同。
- 1.2 蜘蛛管家平台:指蜘蛛管家享有全部知识产权、提供给您及其他用户登录和使用的蜘蛛管家网站及 小程序客户端。
- 1.3 商品:是销售商通过本平台向您推荐并进行销售的具体商品的统称。
- 1.4 销售商:通过本平台销售商品和提供服务的公司,根据销售主体的不同,区分为自营销售商及第三方销售商,自营销售商为蜘蛛管家公司,第三方销售商为入驻本平台的除蜘蛛管家外的第三方商家。
- 1.5 购物车:是模拟线下实体商店提供给顾客放置商品的“购物车”的一个概念,指本平台向您展示您已经下达订单、准备购买但尚未支付相应的购买价款的商品信息的网页区域, 又称“虚拟购物车”。
- 1.6 订单:指由本平台结帐程序生成的记录您通过本平台所购买的商品的名称、品牌、价款、折扣等交易信息的表格。这份文件将被用作所有可能发生的与您购买有关的询问、请求和争议的参考。
- 1.7 送货单:指销售商附录在您所订购的商品的包裹上的、供会员签收的商品销售凭证,送货单一般会简要地说明了对应包裹的每一件商品的名称和数量。
- 1.8 送货地址:指您或者其他用户通过本平台购买商品所要求的送货地址,如果没有特别说明,即为您填写的订单上所记载的送货地址。
- 1.9 用户账号:指您通过登录本平台或者蜘蛛管家提供其他的用户账号注册渠道,注册获得并可据以登录本平台的账号。
- 1.10 恶意评论:是指个人或组织对本平台、蜘蛛管家和/或销售商对外销售的商品没有兴趣,却组织人力或者采用计算机程序模拟正常用户在本平台上大规模发表用户评论,特别发表对本平台、蜘蛛管家或销售商对外销售的商品负面的评论乃至违反国家有关法律法规的评论。
- 1.11 蜘蛛管家平台规则:本平台在论坛、帮助中心内已经发布及后续发布的各类规则、实施细则、解读、产品流程说明、公告等。
- 2. 合同目的
- 本协议旨在约定您在登录、使用本平台,通过本平台购买商品的过程中,您与蜘蛛管家双方分别作为本协议的一方合同当事人所享有的权利和所负有的义务。
- 3. 用户账号
- 3.1 您确认,在您开始注册程序使用蜘蛛管家平台服务前,您应当具备中华人民共和国法律规定的与您行为相适应的民事行为能力。 若您不具备前述与您行为相适应的民事行为能力,则您及您的监护人应依照法律 规定承担因此而造成的一切后果。
- 3.2 您可以通过登录本平台的用户账号注册页面注册用户账号并设置相应的登录密码,一经注册成功,您即可以凭借用户账号及登录密码登录及使用本平台。就目前而言,上述用户账号既可能是您的移动电话号码,也可能是您的个人邮箱账号。
- 3.3 您成功注册用户账号后,如果需要使用该用户账号从本平台购买商品的,至少还应当填写一个收货人、收货地址和手机号码。
- 3.4 蜘蛛管家平台只允许每位用户使用一个蜘蛛管家平台账户。如有证据证明或蜘蛛管家根据蜘蛛管家平台规则判断您存在不当注册或不当使用多个蜘蛛管家平台账户的情形,蜘蛛管家平台可以采取冻结或关闭账户、取消订单、拒绝提供服务等措施,如给蜘蛛管家平台及相关方造成损失的,您还应承担赔偿责任。
- 3.5 您务必妥善保管您的用户账号、登录密码、支付密码(如有)及您在其项下填写的所有个人信息。 账户因您主动泄露或因您遭受他人攻击、诈骗等行为导致的损失及后果,本平台并不承担责任,您应通过司 法、行政等救济途径向侵权行为人追偿。除本平台存在过错外, 您应对您账户项下的所有行为结果(包括但不限于在线签署各类协议、发布信息、购买商品及服务及披露信息等)负责。
- 3.6 为了防止您及其他用户的用户账号及其项下的个人信息泄露或者被他人窃取,蜘蛛管家可能会随时采取计算机病毒查杀技术、计算机加密技术等措施进行保护。对此,您完全同意并接受,但这并不能免除本协议第 3.5 条所述的、您对用户账号及其项下的个人信息所负有的妥善保管义务。
- 3.7 由于蜘蛛管家平台账户关联您的个人信息及平台商业信息,您的蜘蛛管家平台账户仅限您本人使用。仅当有法律明文规定、司法裁定或经本平台同意,您方能进行账户的转让。您的账户一经转让,该账户项下的权利义务一并转移。除此外,您的账户不得以任何方式转让,否则本平台有权追究您的违约责任,由此产生的一切责任由您承担。
- 3.8 您如果遗忘了密码或者密码被他人修改,您可以按照蜘蛛管家公布的账号及密码找回规则,通过蜘蛛管家提供的账号及密码找回系统程序进行找回,或者在第一时间联系蜘蛛管家的客服人员协助找回,但蜘蛛管家不保证一定可以找回。
- 3.9 您充分理解并完全同意:根据您的用户账号下的商品购买记录及其他相关信息,销售商如果发现或者合理怀疑您此前或者当次通过本平台或者蜘蛛管家提供的其他网购渠道购买的商品有出现并非用于个人消 费或者使用用途等在《违规订单处理规则》中列明情形的,对于您的这个用户账号的商品购买需求,销售商有权依据《违规订单处理规则》规定采取不予接受或取消交易并不予发货等措施,具体以《违规订单处理规则》公示内容为准。而且,蜘蛛管家视情况还有权冻结您的这个用户账号,使之无法通过本平台以及蜘蛛管家提供的其他网购渠道下达订单、购买商品。
- 3.10 作为一个蜘蛛管家的用户,您可以邀请任何一个您的亲情、同事加入本站。这样您就成为他们的邀请人。然而,假如您希望扩大邀请至您家庭成员、朋友、 同事等直系圈子以外的人,或者您希望把您的网站链接到本平台,您必须获取蜘蛛管家的预先许可。 在未取得蜘蛛管家事先的书面许可情况下,任何会员通过任何方式组织任何类型的大规模邀请计划,导致不符合前述条款的,将被禁止使用本平台,并且他的个人帐户将被取消。为了防止任何发动直系圈子以外的人自己成为会员的企图,最多两个不同的会员可以使用同一个住所地址。
- 3.11 商品描述与营销信息商品描述:除非销售商或者本平台另有说明,销售商出售的商品均为正宗的商品。蜘蛛管家直接与销售商合作开展各项营销活动,相关商品信息 均由销售商提供,蜘蛛管家尽可能根据所接收到的商品信息准确、详尽地描述每一件商品。然而,由于销售商所提供的商品不一定是准确、完整、可靠、有效和没有错误的,因此蜘蛛管家不能保证本平台所有商品的描述和其他相关内容是准确、完整、可靠、有效和没有错误的。
- 4.2 营销信息:您一经注册用户账号,即视为您同意蜘蛛管家及/或其关联公司通过短信或者电子邮件的方式向您注册时填写的手机号码或者电子邮箱发送相应的商品广告信息、促销优惠等营销信息;您如果不同意发送,您可以通过相应的退订功能进行退订。
- 4. 商品价格
- 本平台上显示的所有价格都是以人民币为计价单位,包括所有的税费,但不包括运费。结帐之前运费不会自动计算包含在订单总价之内。在商品详情页面里您可以找到所有的相关信息,支付价格为下订单时的有效价格。
- 5. 订单
- 5.1 蜘蛛管家保留对单个商品的总出售数量进行限制、对单个订单的商品购买数量及同一 IP 地址对同类商品购买数量进行限制的权利。
- 5.2 根据您填写的订单信息,系统将会生成一份包含您的订单的所有必要信息的电子订单表格。在结帐的过程中,您将被邀请复查订购商品的信息、付款方式以及这些商 品的运输方式和费用。依据这些信息生成的最终订单表格被认为是该次交易的有效证据,这份文件被认为是所有的发货、问题、退货和争议事项的参考,所以您必须 非常仔细地复查这些信息并纠正一切可能的错误。点击“完成”意味着您认可订单表格中包含的所有信息都是正确和完整的。
- 5.3 如果您填写的收货人与用户本人不一致的,收货人的行为和意思表示视为您的行为和意思表示,您应对收货人的行为及意思表示的法律后果承担连带责任。
- 6. 取消订单
- 6.1 如您需修改订单请在下单后24小时内自助网上修改,如订单显示“订单已审核”将不能再进行修改。
- 6.2 您也可以选择取消订单,对反复的取消行为,我们可能会调查其原因,也可能会成为我们可能拒绝向您提供服务、冻结或关闭您的个人帐户的原因。
- 7. 合同成立
- 当您作为消费者为生活消费需要下单并支付货款的情况下,您货款支付成功后即视为您与销售商之间就已支付货款部分的订单成立合同关系。
- 8. 商品缺货
- 尽管销售商做出最大的努力,但由于市场变化及各种以合理商业努力难以控制因素的影响,无法避免的会出现您提交的订单信息中的商品出现缺货、价格标示错误等情况;如您下单所购买的商品出现以上情况,造成了重大误解,您有权取消订单,销售商亦有权自行取消订单,若您已经付款,则将为您办理退款。
- 10.配送服务
- 您所订购的商品有两种配送方式:(1)由蜘蛛管家选择具有运输服务资质的公司为您提供运输代理服务;(2)由用户选择具有提供运输服务资质的公司为您提供运输代理服务。
- 11. 交付
- 11.1 您所订购的商品将被送至订单表格上注明的送货地址。无论什么原因商品不能送达到送货地址的,销售商将会尽快跟您取得联系。假如从销售商第一次试图跟您联系之日 7 天内您没有提供答复,我们将取消该订单。
- 11.2 在您收到订购商品时,您书面签收或以其他合法方式与配送公司确认签收的则证明您收到了完好状态的商品。如果包装出现破损,请您拒收。
- 11.3 您在本平台购买的商品由配送公司(包括顺丰物流等)为您完成订单交付的,系统或者单据记录的签收时间为交付时间;您购买的商品采用在线传输方式交付的,销售商向您指定系统发送的时间为交付时间;您购买服务的,生成的电子或者实物凭证中载明的时间为交付时间。
- 11.4 如果送货单中的商品列表与您的订单表格中所记录的不同,或者您收到的商品与送货单中的商品列表不符,您可以按照本平台对外公布且正在实施的退货政策及退货程序,将相应的商品退回销售商。
- 12. 退回订单
- 12.1 如果您对您通过本平台所订购的商品不符合特殊要求,您可以退回所有或部分商品。已经收取到的被退回的商品的价款,销售商将扣除退部分费后之后将相应的余额返还给您(不含运费)。您在下达的订单如果使用了代金券的,蜘蛛管家亦将会按照相应的活动规则进行返还。
- 12.2 您如果需要退货的,请务必于收到商品之日起14 天内,按照不影响商品正常使用及再次销售的原则,将您需要退货的商品及其包装、赠品、送货单、税务发票(如有)等送货时一并交付给您的物品和资料,全部完好无损地退回销售商。否则,我们有权不予退货。除有相反的证据外,退货的日期以销售商收到的包裹上显示的寄出邮戳所显示的日期为准。对于某些商品,如在商品详情页面及有关退货政策中已提示该类商品不予以退货的,您的下达订单行为将被视为您已同意接受平台对此类商品不予退货的安排。
- 12.3 销售商有权拒绝不符合蜘蛛管家对外公布实施的退货政策所规定的条件的所有退货。仅当销售商确认以上规定的这些条款得到了适时的遵从后,才会启动返还货款金额的程序。收到退货后14天内,所有的退款均遵循退换货政策操作。一旦实现退款,您将收到一封确认和终止程序的站内信息。
- 12.4 如果您的退货与上述退货规定不符,您将没有资格得到任何退款。不过,您仍有资格自行支付费用(包括运费)以便接收已经退回到销售商的商品。如果您不想接收已经退回到销售商的商品,销售商有权保有这些商品并保留已经收到的金额。
- 13. 商品保证
- 本平台所展示的商品完全符合中华人民共和国的相关法律法规的规定。蜘蛛管家为了保障消费者合法权益,特在中国人民财产保险股份有限公司为蜘蛛管家售卖的商品进行了投保。如果您对在本平台所购买的商品品牌存在疑问,请及时联系蜘蛛管家在线客服,并提供订单信息,蜘蛛管家将帮助您进行全面调查。
- 14. 知识产权
- 14.1 蜘蛛管家对本平台的内容享有全部知识产权,包括但不限于:编码、商标、服务标志、商号、图形、美术品、照片、肖像、文字内容、音频片断、按钮图标、购买评价以及计算机软件、标识、数码下载、数据汇编都是蜘蛛管家或其内容提供者的财产,受到中华人民共和国知识产权相关法律法规的保护。您对其仅享有本协议约定范围内的临时的、可撤销的非专有使用权。
- 14.2 您仅在符合本平台使用目的的前提下被许可浏览和使用本平台,即以个人名义浏览信息和购买供个人使用商品的目的。其他方式的使用都是被严格禁止的,包括但不限于以下方式:复制、修改、销售、传送、再版、删除、添加、展览、记入或演示本平台的内容或以其他方式部分地或整体地非法使用本平台的内容,但经蜘蛛管家允许将本平台当中的资讯转发至微信朋友圈等第三方媒体的除外。
- 15. 用户守则
- 15.1 本平台与其他在线使用的互联网网站一样,您如果需要进行下载、安装、运行、登录或者使用,您至少必须自备一部可供上网的智能移动终端,并确保其能够通过互联网与本平台服务器软件进行实时的信息(即电子数据)交互,相应的上网流量费等相关费用由您自行承担。除非另有说明,蜘蛛管家存储在其服务器上的数据是蜘蛛管家和其会员之间交易的唯一有效证据。
- 15.2 本平台目前免费使用,蜘蛛管家有权对本平台进行升级及更新,自行设置收费的软件功能、费率标准、收费对象及/或收费时段。您如果不同意蜘蛛管家设置的软件功能、费率标准、收费对象及/或收费时段的,则应当立即停止使用本平台;您如果继续使用的,则视为您接受蜘蛛管家的上述设置,您应当遵照履行并向蜘蛛管家支付相应的费用。您不得进行任何侵犯本平台知识产权的行为,或者进行其他的有损于蜘蛛管家或其他用户合法权益的行为,包括但不限于:
- (1) 删除或修改本平台上的版权信息;
- (2) 修改、复制和/或发行本平台;
- (3) 在本平台当中内置各种插件程序或者其他的第三方程序;
- (4) 进行编译、反编译、反向工程或者以其他方式破解本平台的行为;
- (5) 使用本平台外挂和/或利用本平台当中的 BUG 来获得不正当的利益;
- (6) 利用劫持域名服务器等技术非法侵入、破坏本平台的服务器软件系统,或者修改、增加、删除、窃取、截留、替换、抓取本平台的客户端和/或服务器软件系统中的数据,或者非法挤占本平台的服务器空间,或者实施其他的使之超负荷运行的行为;
- (7) 假冒蜘蛛管家或签约商家在本平台当中发布任何诈骗或虚假信息;
- (8) 利用本平台故意传播恶意程序或计算机病毒。
- 15.3 您充分理解到:蜘蛛管家可能会不定期地通过发布软件升级包或软件补丁、在线升级等方式对本平台进行更新。更新的过程中,蜘蛛管家可能通过互联网调取、收集您的 PC 端终端上的关于本平台的客户端软件版本信息、数据及其他有关资料,并自动进行替换、修改、删除和/或补充。此种行为是平台更新所必须的一种操作或步 骤,您如果不同意蜘蛛管家进行此种操作,请您不要进行更新;您更新的行为即视为您同意蜘蛛管家进行此种操作。
- 15.4 您有权在本平台当中发表评论,转发或者回复其他用户的评论,但您应确保评论真实、客观且不会侵犯任何第三方的著作权、肖像权、名誉权、隐私权等合法权利。而且,您不得借助本平台用户评论功能发布任何广告。
- 15.5 您应当遵守国家有关法律法规,不得在本平台当中发表、转发或者传播含有下列内容的信息:
- (1) 反对宪法所确定的基本原则的;
- (2) 危害国家安全、泄露国家秘密、颠覆国家政权、破坏国家统一的;
- (3) 损害国家荣誉和利益的;
- (4) 煽动民族仇恨、民族歧视,破坏民族团结的;
- (5) 破坏国家宗教政策,宣扬邪教和封建迷信的;
- (6) 散布谣言,扰乱社会秩序,破坏社会稳定的;
- (7) 散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的;
- (8) 侮辱或者诽谤他人,侵害他人合法权益的;
- (9) 含有法律、行政法规禁止的其他内容的。
- 15.6 您充分理解并完全同意:对您在本平台当中发表、转发或者传播的评论及其内容,包括但不限于视频、照片、文字内容,不论是否属于著作权法意义上的作品,蜘蛛管家均享有永久的、无期限及地域限制的、完全免费的使用权。而且,对于上述评论和/或内容,蜘蛛管家还享有下列各项权利,且实际行使时无须另行征得您的同意:
- (1) 有权对其进行修改、编辑、汇编、改编、分发或者以其他的方式进行使用;
- (2) 既有权使用其全部内容,也有权使用其中的某一部分或某几部分内容;
- (3) 有权将其许可给任何第三方使用,被许可的第三方征得蜘蛛管家同意后,既可以将其使用于蜘蛛管家网站和/或其 App 等蜘蛛管家自有网络平台,也可以将其使用于被许可的第三方自有的网络平台。
- (4) 有权单独以自己的名义,对未经蜘蛛管家许可而擅自使用上述评论和/或内容的第三方进行取证、证据保全、公证、提起诉讼和/或依法采取其他合法措施,以追究其法律责任。
- 15.7 个人账户是蜘蛛管家授权您使用蜘蛛管家平台用户管理系统的唯一凭证。蜘蛛管家所提供的代金券、积分、折扣、推送等服务和优惠均通过用户管理系统发放,并且仅提供给获得授权的用户个人使用。您同意在符合法律法规及本条款规定的情况下使用个人帐户,蜘蛛管家有可能在某些情况(包括但不限于您违反有关法律法规规定或本协议和/或其它公开规则,或者您严重违背社会公德、提供虚假注册身份信息、经蜘蛛管家判定认为存在恶意退货或不合常理的高退拒率等情形、或其他损害或经本平台判定认为可能损害蜘蛛管家利益的不正当行为等)下暂时冻结、永久冻结、修改、 删除您的个人账户或者采取其他处理措施。特别地,您了解并同意,蜘蛛管家用户管理系统中个人帐户、积分、代金券等互联网产品及服务所有权归属蜘蛛管家,会员在满足蜘蛛管家公布的规则的前提下有权使用上述产品及服务。非经蜘蛛管家同意,您不得将蜘蛛管家各项产品及服务用于商业用途(例如:销售蜘蛛管家个人帐 户、销售个人帐户下积分、代金券等)。在使用蜘蛛管家服务过程中,如果您或您的个人帐户刻意规避蜘蛛管家管理措施,或存在涉嫌欺诈、商业牟利、不恰当 或不诚实地使用服务或者其他违反本协议和/或其他公开规则的行为(包括但不限于使用作弊软件获取积分或代金券及、贩卖个人帐号、积分或 代金券及、盗号、协助盗号、非用于个人或家庭的合理消费等),蜘蛛管家有权拒绝为您继续提供服务,永久冻结您的个人帐户,并根据具体情况并有权对该等个人帐号中因上述手段而产生、获得的一切虚拟产品予以清零。
- 15.8 如您的行为使蜘蛛管家及/或其关联公司遭受损失(包括自身的直接经济损失、商誉损失及对外支付的赔偿金、和解款、律师费、诉讼费等间接经济损失),您应赔偿蜘蛛管家及/或其关联公司的上述全部损失。 如您的行为使蜘蛛管家及/或其关联公司遭受第三人主张权利,蜘蛛管家及/或其关联公司可在对第三人承担金钱给付等义务后就全部损失向您追偿。如因您的行为使得第三人遭受损失,蜘蛛管家及/或其关联公司出于社会公共利益保护或消费者权益保护的,可自您的任何蜘蛛管家账户中划扣相应款项进行支付。
- 15.9 您充分理解并完全同意,本平台提供的均为数量有限且面向不特定用户的商品或服务,作为完全民 事行为能力人,您在使用本平台进行订购商品或服务时,应尽基本的审慎注意义务,并合理使用您的合法权益,若您存在滥用自身权利、违反诚实信用原则等不当行为,可能会使其他用户的合理订购需求得不到满足,并不合理地增加本平台与其他用户的缔约和履约成本。则蜘蛛管家有权根据《违规订单处理规则》等公示的平台规则对您的不当行为进行处理。
- 16. 免责声明
- 16.1 关于本平台的免责声明
- 16.1.1 本平台与其他的在线使用的互联网网站一样,也会受到各种不良信息、网络安全和网络故障问题的困扰,包括但不限于:
- (1) 其他用户可能会发布诈骗或虚假信息,或者发表有谩骂、诅咒、诋毁、攻击内容的,或者含有淫秽、色情、下流、反动、煽动民族仇恨等让人反感、厌恶的内容的非法言论;
- (2) 其他用户可能会发布一些侵犯您或者其他第三方知识产权、肖像权、姓名权、名誉权、隐私权和/或其他合法权益的图片、照片、文字等资料;
- (3) 面临着诸如黑客攻击、计算机病毒困扰、系统崩溃、网络掉线、网速缓慢、程序漏洞等问题的困扰和威胁。
- 16.1.2 您充分理解到:本协议第 16.1.1 条所述的各种不良信息、网络安全和网络故障问题,并不是蜘蛛管家或者本平台所导致的问题,给您造成的任何损失,概由您自行承担,蜘蛛管家无须向您承担任何责任。
- 16.1.3 您完全同意:除法律法规规定或者您与蜘蛛管家约定须提前通知的以外,蜘蛛管家有权单方面地中止或者终止本平台所提供的服务而无须提前通知您。该等中止、终止,可能是因为国家法律、法规、政策及国家机关的命令或者 其他的诸如地震、火灾、海啸、台风、罢工、战争等不可抗力事件,还可能是因为您违反本协议第 15.3 条、第 15.5 条和/或第 15.6 条所约定的用户守则。
- 16.2 关于商品销售的免责声明
- 16.2.1 由于用不同手机终端设备观看时页面显示的差异,蜘蛛管家上促销的商品在图像和颜色方面可能跟真实的物品不尽一致。因此,所有显示的图片、视频和其他商品显示方法仅限于图示目的,在任何情况下不认为是合同的组成部分。假如供出售的商品跟网站上的描述不同,对您唯一的补救措施是根据本协议在没有使用的情况下退回该商品。
- 16.2.2 销售商保留根据市场价格波动随时修改上线商品价格的权利而无须事先通知您。在由于排版错误或销售商提供价格信息错误的情况下以不正确的价格列出来的商品,如果造成了重大误解,销售商有拒绝或取消任何对以不正确的价格列出来的商品所下订单的权利。
- 16.2.3 由于合理的或不可避免的送货延迟对您或第三方带来的任何损失,蜘蛛管家不负任何责任。在这种情况下,蜘蛛管家将尽快地把任何可预知的延迟情况通知您,并在此时请您选择是否取消订单。
- 16.2.4 蜘蛛管家上面陈列的货物完全符合中华人民共和国的相关法律法规的规定。蜘蛛管家直接与销售商合作,他们保证其商品是正宗的。您在本平台上找到的所有商品及商品描述均由销售商提供,仅由他们对其真实 性负责。您应该系统性地参照货物描述找出他们的特征,对于任何种类的直接或 间接的、实质或非实质的 由于商品的使用造成的损失,蜘蛛管家概不负责。
- 17. 个人信息保护
- 17.1 蜘蛛管家可能通过本平台 在您自愿选择服务或提供信息的情况下收集您的个人信息(简称“个人信息”),例如您的姓名、邮件地址、电话号码及其他身份信息等。我们有可能会保留一些用 户的使用习惯信息,用于更好地了解和服务于用户。这些数据将有利于我们开发出更符合用户需求的功能、信息和服务。
- 17.2 蜘蛛管家通过本平台可能会收集一些特定的关于您所使用的机器的技术信息,可能会包括:IP 地址、操作系统版本、浏览器版本、显示器分辨率、推荐网站等。这些信息将用于提供更好的用户使用体验,提供更方便的服务。
- 蜘蛛管家希望通过隐私权政策向您清楚地介绍蜘蛛管家对您个人信息的处理方式,因此建议您完整地阅读隐私权政策(点击此处),以帮助您更好地保护您的隐私权。
- 17.3 蜘蛛管家非常重视保护您的蜘蛛管家账号及密码、电话号码、地理位置、智能移动终端品牌及型号等个人信息,未经您同意,蜘蛛管家不会将其披露给无关的第三方,更不会将其公之于众,但因下列原因而披露给第三方的除外:
- (1) 基于国家法律法规的规定而对外披露;
- (2) 应国家司法机关、行政监管机关及其他有关机关基于法定程序的要求而披露;
- (3) 为保护蜘蛛管家或您的合法权益而披露;
- (4) 在紧急情况,为保护其他用户及第三方人身安全而披露;
- (5) 经您本人同意或应您的要求而披露。
- 17.4 蜘蛛管家将使用各种安全技术和程序防止您及其他用户个人信息的丢失、不当使用、未经授权阅览或披露。但您充分理解到:由于技术的限制以及可能存在的各种恶意手段,在互联网行业,即便竭尽所能加强安全措施,也不可能始终保证信息百分之百的安全。
- 18. 通知与送达
- 18.1 联系方式
- 您在注册成为蜘蛛管家平台用户,并接受蜘蛛管家平台服务时,您应该向蜘蛛管家提供真实有效的联系方式(包括您的电子邮件地址、联系电话、联系地址等),对于联系方式发生变更的,您有义务及时更新有关信息,并保持可被联系的状态。
- 您在注册蜘蛛管家平台用户时生成的用于登陆蜘蛛管家平台接收站内信、系统消息的会员账号(包括子账号),也作为您的有效联系方式。
- 蜘蛛管家将向您的上述联系方式的其中之一或其中若干向您送达各类通知,而此类通知的内容可能对您的权利义务产生重大的有利或不利影响,请您务必及时关注。
- 18.2 送达
- 蜘蛛管家通过上述联系方式向您发出通知,其中以电子的方式发出的书面通知,包括但不限于在蜘蛛管家平台公告,向您提供的联系电话发送手机短信,向您提供的电子邮件地址发送电子邮件,向您的账号发送系统消息以及站内信信息,在发送成功后即视为送达;以纸质载体发出的书面通知,按照提供联系地址交邮后的第五个自然日即视为送达。
- 对于在蜘蛛管家平台上因交易活动引起的任何纠纷,您同意司法机关(包括但不限于人民法院)可以通过手机短信、电子邮件等现代通讯方式或邮寄方式向您送达法律文书(包括但不限于诉讼文书)。您指定接收法律文书的手机号码、电子邮箱等联系方式为您在蜘蛛管家平台注册、更新时提供的手机号码、电子邮箱联系方式,司法机关向上述联系方式发出法律文书即视为送达。您指定的邮寄地址为您的法定联系地址或您提供的有效联系地址。
- 您同意司法机关可采取以上一种或多种送达方式向您达法律文书,司法机关采取多种方式向您送达法律文书,送达时间以上述送达方式中最先送达的为准。
- 您同意上述送达方式适用于各个司法程序阶段。如进入诉讼程序的,包括但不限于一审、二审、再审、执行以及督促程序等。
- 你应当保证所提供的联系方式是准确、有效的,并进行实时更新。如果因提供的联系方式不确切,或不及时告知变更后的联系方式,使法律文书无法送达或未及时送达,由您自行承担由此可能产生的法律后果。
- 19. 其他约定
- 19.1 蜘蛛管家保留随时地不需要任何理由地、单方面地修订本协议的权利。本协议一经修订即完全替代修订前的协议版本,并通过适当的方式向所有用户公开征求意见,您可以通过本平台或本平台指定的方式反馈您的意见。您应当及时关注和了解本协议的修订情况,如果您不同意修订后协议版本,请您立即停止使用本平台,否则即视同您同意并完全接受修订后的协议版本。
- 19.2 蜘蛛管家有可能以消费者告知书、买家须知、温馨提示等形式,向您说明您在使用本平台购买商品时应
- 当履行的本协议所约定的义务之外的其他义务,您亦应当仔细阅 读并全面履行。上述说明如果与本协议相互冲突或者矛盾的,以上述约定为准;上述约定未涉及的内容,仍适用本协议。
- 19.3 本协议各条款是可分的,所约定的任何条款如果部分或者全部无效,不影响该条款其他部分及本协议其他条款的法律效力。
- 19.4 本协议各条款的标题只是为了方便用户阅读而起到提示、醒目的作用,对本协议的解释及适用没有任何指引作用。
- 19.5 蜘蛛管家基于本协议及其补充协议的有效弃权必须是书面的,并且该弃权不能产生连带的相同或者类似的弃权。
- 19.6 由于互联网高速发展,您与蜘蛛管家签署的本协议列明的条款并不能完整罗列并覆盖您与蜘蛛管家所有权利与义务,现有的约定也不能保证完全符合未来发展的需求。因此,蜘蛛管家平台隐私权政策、蜘蛛管家平台 规则均为本协议的补充协议,与本协议不可分割且具有同等法律效力。如您使用蜘蛛管家平台服务,视为您同意上述补充协议。
- 19.7 您与蜘蛛管家均应当严格履行本协议及其补充协议所约定的各项义务,如发生争议或者纠纷,双方可以友好协商解决;协商不成的,任何一方均可向佛山互联网法院提起诉讼。
- 19.8 本协议及其补充协议签订地为广东省佛山市禅城区,均受中华人民共和国法律、法规管辖。
-
`
-
- const policy = `
- 蜘蛛管家基本功能隐私政策
- 简介及提示
- 【特别提示条款】
- 您的信任对佛山市浩川长盛科技有限公司(“我们”)开发运营的蜘蛛管家非常重要,我们深知个人信息对您的重要性,我们将按照法律法规要求,采取相应安全保护措施,尽力保护您的个人信息。您在使用我们的产品与/或服务前,请您务必先仔细阅读和理解《蜘蛛管家基本功能隐私政策》(“本隐私政策”),特别应重点阅读我们以粗体标识的条款,确保您充分理解和同意后再开始使用。我们希望通过本隐私政策向您说明我们在您使用我们的产品与/或服务时如何收集、使用、保存、共享和转让这些信息,以及我们为您提供的访问、更新、删除和保护这些信息的方式。如您阅读过程中有任何疑问,可通过本隐私政策中的联系方式咨询我们。
- 您同意基本功能隐私政策表示您已了解应用提供的基本功能及其运行所需的必要个人信息,并同意
- 相应的收集使用,但并不代表您已单独同意开启拓展功能、处理非必要个人信息,相关拓展功能的开启、处理非必要个人信息以及处理敏感个人信息,我们会根据您的实际使用情况单独征求您的同意。
-
- 【版本更新日期】:2023 年【02】月【10】日
- 【版本生效日期】:2023 年【02】月【11】日
- 《蜘蛛管家基本功能隐私政策》
- 【定义及适用范围】
- 一、本隐私政策与您所使用的蜘蛛管家网站、客户端、小程序以及随技术发展出现的新形态向您提供的各项产品和服务(以下统称“我们的产品与/或服务”)息息相关,希望您在使用我们的产品与/或服务前仔细阅读并确认您已经充分理解本政策所写明的内容,据此您可以按照本隐私政策的指引做出您认为
- 适当的选择。本隐私政策适用于我们的产品与/或服务的最新版本。如我们关联公司的产品或服务中使用了蜘蛛管家提供的产品或服务但未设置独立隐私政策的,则本隐私政策同样适用于该部分产品或服务。
- 二、本隐私政策所称的关联公司是指:一方直接或间接控制、共同控制另一方,以及两方或两方以上受同一主体控制、共同控制的公司。前述“控制”是指,直接或间接拥有的权力,从而通过行使表决权、合同或其他方式决定或影响某一方的管理或决策方向。
- 三、本隐私政策中涉及的相关术语,我们尽量以简明扼要的表述,并提供进一步说明的链接,以便您更好地理解。您使用或在我们更新本隐私政策后(我们会及时提示您更新的情况)继续使用我们的产品与/或服务,即意味着您同意本隐私政策(含更新版本)内容,并且同意我们按照本隐私政策收集、使用、保存和共享您的相关信息。
-
- 本隐私政策将帮助您了解以下内容:
-
- 一、我们如何收集和使用您的个人信息二、我们如何使用 Cookie 和同类技术
- 三、我们如何共享、委托处理、转让、公开披露您的个人信息四、我们如何保护和保存您的个人信息
- 五、您如何管理您的个人信息
- 六、我们如何处理未成年人的个人信息七、您的个人信息如何在全球范围转移
-
- 八、通知和修订 九、如何联系我们
-
- 一、我们如何收集和使用您的个人信息
-
- 我们将遵循合法、正当、必要和诚信原则,在本政策范围内收集和使用您的个人信息:
-
- (一)为实现基本功能所收集和使用您个人信息的情形
- 我们的产品与/或服务类型为“网上购物”,基本功能为“购买商品或服务”, 为实现向您提供我们的产品与/或服务的基本功能,我们会收集、使用和保存与您相关的必要个人信息。如果您拒绝提供相应信息,您将无法正常使用我们的产品与/或服务。实现网上购物基本功能的各项场景如下:
-
- 1、注册用户
- 为成为我们的用户,以便我们为您提供会员服务,您需要提供手机号码,并创建用户名和密码。您使用第三方账号注册成为我们的会员或者登录会员的,仍需要您提供手机号码,用于创建蜘蛛管家账户或绑定您已有的蜘蛛管家账户。我们将通过发送短信验证码的方式来验证您的身份是否有效,通过 SIM 卡信息识别并显示对应的运营商。如果您仅需使用展示商品或服务基本功能,您不需要注册成为我们的会员及提供上述信息。
-
- 2、展示商品或服务
- 基于确保在联网状态下向您提供适配的页面展示,保障商品或服务页面正常展示以及兼容性的需要,我们会根据您在软件安装及使用中主动授予的具体权限,收集并记录您所使用的设备信息【设备名称、设备型号、操作系统和应用程序版本、语言设置、分辨率、唯一设备识别码(IDFA/ OAID/Android ID 信息,以您所使用的设备及操作系统所支持的识别码为准)、运营商网络类型、设备状态、网络状态】。
- (1) 浏览
- 当您浏览商品或服务时,您可以选择对感兴趣的面料、色卡等内容进行点击/收藏/添加/分享/购买等操作,我们会收集您的操作记录用于实现前述功能及其他我们明确告知的目的。
- (2) 搜索
- 当您使用搜索功能时,我们会收集您的搜索记录,包括搜索内容(搜索词)、浏览记录/时间、搜索时间/次数,并向您展示搜索历史记录。
- (3) 个性化推荐
- 为帮助您快速找到您所需要的商品和服务,将您感兴趣的商品或服务信息展示给您,或在您搜索时向您展示您可能希望找到的商品,我们会收集和使用您的设备信息和日志信息(包括您的搜索记录、浏览记 录、订单信息、关注收藏及分享信息、IP 地址、浏览器类型、访问日期和时间及您访问的网页记录),结合您的个人资料以及其他您已授权的信息预测您的偏好特征,向您推送您可能感兴趣的商品/服务、商业广
- 告、商业性短信及其他营销信息。上述做法可能会对您的商品浏览页面展示、商品搜索页面排序、商品推荐页面展示产生影响。
- 如果您不希望受个性化内容以及商业广告的影响,您可以通过如下方式保障您的体验:
- ①如果您不想接受我们给您发送的商业短信/智能语音外呼服务,您可随时根据短信提示或我们提供的其他方式进行退订;
- ②您可以通过长按被推荐的商品或服务图片,根据提示弹窗选择屏蔽相关商品或服务类目;
- ③您可以在商品展示页选择按照分类进行浏览和查找商品和服务,我们还在搜索结果中向您提供了按照价格、销量排序等不针对个人特征的选项;
-
- 3、下单及交付
- 当您准备对您购物车/购物袋内的商品进行结算时,蜘蛛管家系统会生成您购买该商品的订单。您需要在订单中至少填写您的收货人姓名、收货地址以及手机号码,同时该订单中会载明订单号、您所购买的商品或服务信息、您应支付的货款金额和支付方式及时间。
- 上述所有信息构成您的“订单信息”,我们将使用您的订单信息来进行您的身份核验、确定交易、支付结算、完成配送、为您查询订单以及提供客服咨询与售后服务。
- 如果我们委托第三方向您交付,您知晓并同意相应第三方获知及使用您的上述信息,用于完成交付目
- 的。如果您在订单生成后修改了上述信息,您同意蜘蛛管家和第三方均能获知及使用上述信息。如果您拒绝提供或者不同意共享此类信息,我们将无法完成相关交付服务。如果您在订单生成后更改了“订单信息”,包括入线物流承运商更改等,您同意第三方将您修改后的“订单信息”完整的共享给我们。
- 您可以通过蜘蛛管家为其他人订购商品或服务,您需要提供该实际订购人的前述个人信息。向蜘蛛管家提供该实际订购人的前述个人信息之前,您需确保您已经取得其授权同意。
-
- 4、支付
- 在您下单后,您可以选择与蜘蛛管家的关联方(招商支付)或合作的第三方支付机构(包括支付宝、微信支付, 以下统称“支付机构”)所提供的支付服务。我们需要将您的订单号与交易金额信息与这些支付机构共享以实现其确认您的支付指令并完成支付。在您使用支付功能时,支付机构会通过其页面收集或验证您的银行卡(含储蓄卡、信用卡)及其他支付必要信息,以实现其确认您的支付指令并完成支付,具体适用各支付机构相应的隐私政策及相关用户服务协议。在您完成订单支付后,支付机构将向我们共享您的支付时间、支付金额、支付渠道、支付号、支付方式,以帮助我们确认您是否已经付款。
-
- 5、客服与售后功能
- 我们的电话客服和售后功能会使用您的账号信息和订单信息。为保证您的账号安全,我们的呼叫中心客服和在线客服会使用您的账号信息与您核验您的身份。当您需要我们提供与您订单信息相关的客服与售后服务时,我们将会查询您的订单信息。您有可能会在与我们的客服人员沟通时,提供给出上述信息外的
- 其他信息,如当您要求我们变更配送地址、联系人或联系电话。您也可以通过我们提供自助方式进行操作
- 退换货申请、上门取货等服务,届时可能需要您提供寄件人信息(包括收货人姓名、联系方式、地址) 。
-
- 6、为您提供安全保障
- 为履行保障网络安全与电子商务交易安全的法定义务,提高我们产品或服务的安全性,识别违反法律法规或蜘蛛管家相关协议规则的情况,我们可能收集您的设备信息(设备型号、运行中的进程信息、Android ID/OAID、操作系统及软件版本、设备状态、网络状况、电池使用情况)、设备网络环境信息【IP 地址、WiFi 信息(bssid、ssid)、蓝牙信息、设备传感器、基站信息】,并使用或整合您的会员信息、日志信息以及我们关联公司、合作伙伴取得您授权或依据法律共享的信息,来识别是否为真实自然人用户、是否为异常地点登录、综合判断您账户及交易风险、进行身份验证、检测及防范安全事件,并依法采取必要的记录、审计、分析、处置措施。
-
- (二)您个人信息使用的规则
-
- 1、我们会根据本隐私政策的约定并为实现我们的产品与/或服务功能对所收集的个人信息进行使用。
-
- 2、在收集您的个人信息后,我们会通过技术手段对您的个人信息进行去标识化处理。
-
- 3、请您注意,您在使用我们的产品与/或服务时所提供的所有个人信息,除非您删除或通过系统设置拒绝我们收集,否则将在您使用我们的产品与/或服务期间持续授权我们使用。
-
- 4、我们会对我们的产品与/或服务使用情况进行统计,并可能会与公众或第三方共享这些统计信息,以展示我们的产品与/或服务的整体使用趋势,但这些统计信息不包含您的任何身份识别信息。
-
- 5、当我们展示您的个人信息时,我们会采用包括内容替换、匿名处理方式对您的信息进行脱敏,以保护您的信息安全。
-
- 6、当我们要将您的个人信息用于本政策未载明的其它用途时,或基于特定目的收集而来的信息用于其他目的时,会通过您主动做出勾选的形式事先征求您的同意。请您理解,我们向您提供的产品与/或服务将不断更新变化。如果您选择使用本隐私政策中尚未列明的其他产品与/或服务时,我们会在收集您的个人信息前通过协议、页面提示等方式向您详细说明信息收集的目的、方式、范围并征求您的同意。若您不同意提供前述信息,您可能无法使用该项产品与/或服务,但不影响您使用现有产品与/或服务。
-
- 二、我们如何使用 Cookie 和同类技术
-
- (一)Cookie
-
- 1、为确保网站正常运转,为您获得更轻松的访问体验,向您推荐您可能感兴趣的内容,我们会在您的计算机或移动设备上储存名为 Cookie 的小数据文件,Cookie 通常包含标识符、站点名称以及一些号码和字符。借助于 Cookie,网站能够储存您的偏好或购物车/购物袋内的商品等数据。
- 2、您可根据自己的偏好管理或删除 Cookie。您可以清除计算机上保存的所有 Cookie,大部分网络浏览器都设有阻止 Cookie 的功能。但如果您这么做,则需要在每一次访问我们的网站时更改用户设置,也可能导致部分功能无法正常使用。如需了解如何更改浏览器设置,请访问您使用的浏览器的相关设置页面。
-
- (二)网站信标和像素标签
-
- 除 Cookie 外,我们还会在网站上使用网站信标和像素标签等其他同类技术。例如,我们向您发送的电子邮件可能含有链接至我们网站内容的地址链接,如果您点击该链接,我们则会跟踪此次点击,帮助我们了解您的产品或服务偏好以便于我们主动改善客户服务体验。网站信标通常是一种嵌入到网站或电子邮件中的透明图像。借助于电子邮件中的像素标签,我们能够获知电子邮件是否被打开。如果您不希望自己的活动以这种方式被追踪,可以随时从我们的寄信名单中退订。
-
- (三)第三方 SDK、插件
- 为保障我们的产品与/或服务稳定运行以及您能够充分享受和使用我们的产品与/或服务的必需、附加功能,我们的应用中会嵌入授权合作伙伴的 SDK 或其他类似的应用程序。我们会对授权合作伙伴获取有关信息的应用程序接口(API)、软件工具开发包(SDK)进行严格的安全检测,并对关键的第三方执行信息安全审计,以验证第三方的个人信息安全保护措施是否满足蜘蛛管家的相关要求。我们接入的授权合作伙伴所使用的 SDK 请参见此处《第三方 SDK 收集个人信息清单》。对于微信小程序所使用的插件,您可以通过进入小程序,依次点击右上角“...”符号--左下角的小程序名称--“更多资料”,来查看服务商信息。
-
- 三、我们如何共享、委托处理、转让、公开披露您的个人信息
-
- (一)共享
-
- 1、我们不会与蜘蛛管家以外的任何公司、组织和个人共享您的个人信息,但以下情况除外:
- (1) 在获取单独同意的情况下共享:获得您的单独同意后,我们会与其他方共享您的个人信息。
- (2) 根据适用的法律法规、法律程序的要求、强制性的行政或司法要求所必须的情况下进行共享。
-
- 2、基于向您完整提供我们的产品和服务的需要,我们可能会将您的个人信息与我们的关联方或关联产品共享,但我们只会共享必要的个人信息,且受本隐私政策中所声明范围和目的的约束。我们的关联方或关联产品如要改变个人信息的处理目的、范围,将再次征求您的授权同意。
-
- 3、与授权合作伙伴共享:仅为实现本隐私政策中声明的目的,我们的某些服务将由我们和授权合作伙伴共同提供。我们可能会与合作伙伴共享您的某些个人信息,以提供更好的客户服务和用户体验。我们仅会出于合法、正当、必要、特定、明确的目的共享您的个人信息,并且只会共享提供服务所必要的个人信息。我们的合作伙伴无权将共享的个人信息用于与产品或服务无关的其他用途。对于我们与合作伙伴的共享,我们会与其签署严格的数据处理协议,要求其履行信息安全保障义务。我们将您的个人信息所共享的第三方主体、内容及目的请参见此处《与第三方共享个人信息基本情况》。
-
- 4、为了遵守法律、执行或适用我们的使用条件和其他协议,或者为了保护蜘蛛管家、您或其他蜘蛛管家用户的权利及其财产或安全,比如为防止欺诈等违法活动和减少信用风险,而与其他公司和组织交换信息。不过,这并不包括违反本隐私政策中所作的承诺而为获利目的出售、出租、共享或以其它方式披露的个人信息。
-
- 5、对我们与之共享个人信息的公司、组织和个人,我们会与其签署严格的保密协定,要求他们按照我们的说明、本隐私政策以及其他任何相关的保密和安全措施来处理个人信息。在敏感个人信息使用上,我们要求第三方采用数据脱敏和加密技术,从而更好地保护用户个人信息。
-
- (二)委托处理
-
- 我们可能委托授权合作伙伴处理您的个人信息,以便向您提供相应的产品或服务。但我们仅会出于合法、正当、必要、特定、明确的目的共享您的个人信息,并且只会委托处理提供产品或服务所必要的个人信息。我们的合作伙伴无权将委托处理的个人信息用于任何其他用途,如果其将您的个人信息用于我们未
- 委托的用途,将单独征得您的同意。对于我们委托处理合作伙伴,我们会与其签署严格的数据处理协议,要求其履行信息安全保障义务。我们的合作伙伴包括以下类型:
-
- 1、商品或技术服务的供应商。我们可能会将您的个人信息委托处理给支持我们功能的第三方。这些支持包括为我们的供货或提供基础设施技术服务、物流配送服务、支付服务、数据处理等。我们委托处理这些信息的目的是可以实现我们产品与/或服务的功能,比如我们必须与物流服务提供商委托处理您的订单信息才能安排送货(您可以通过“我的订单”—“订单详情”实时查阅具体服务方信息);或者我们需要将您的订单号和订单金额委托给第三方支付机构处理以实现其确认您的支付指令并完成支付等。
-
- 2、广告与推广的合作伙伴。当合作伙伴向使用我们产品与/或服务的用户群提供促销推广的服务时,我们会向这些合作伙伴委托处理不能识别你个人身份的间接画像标签及去标识化的设备信息或匿名化后的设备、网络、渠道信息,并委托处理去标识化的统计分析信息,以提供程序化广告服务。这些信息仅为提高推广的覆盖面以及有效触达率,不会识别您的真实身份或与您的真实身份相关联。我们也会与第三方的平台或媒体合作基于您的个人信息向您推荐个性化的商品或服务。这些个人信息来源于您在使用我们产品与/或服务过程中的行为数据及其间接画像,该过程中我们不会向平台或媒体提供可用于识别你个人身份的信息。
-
- (三)转让
-
- 我们不会将您的个人信息转让给任何公司、组织和个人,但以下情况除外:
-
- 1、在获取单独同意的情况下转让:获得您的单独同意后,我们会向其他方转让您的个人信息;
- 2、根据适用的法律法规、法律程序的要求、强制性的行政或司法要求所必须的情况进行提供;
-
- 3、符合与您签署的相关协议(包括在线签署的电子协议以及相应的平台规则)或其他的法律文件约定所提供;
- 4、在涉及合并、收购、资产转让或类似的交易时,如涉及到个人信息转让,我们会要求新的持有您个人信息的公司、组织继续受本隐私政策的约束,否则,我们将要求该公司、组织重新向您征求授权同意。
-
- (四)公开披露
-
- 我们仅会在以下情况下,才会公开披露您的个人信息:
-
- 1、获得您单独同意或基于您的主动选择,我们可能会公开披露您的个人信息;
- 2、根据法律、法规的要求、强制性的行政执法或司法要求所必须提供您个人信息的情况下,我们可能会依据所要求的个人信息类型和披露方式公开披露您的个人信息。在符合法律法规的前提下,当我们收到上述披露信息的请求时,我们会要求必须出具与之相应的法律文件,如传票或调查函。我们坚信,对于要求我们提供的信息,应该在法律允许的范围内尽可能保持透明。我们对所有的请求都进行了慎重的审查,以确保其具备合法依据,且仅限于执法部门因特定调查目的且有合法权利获取的数据。在法律法规许可的前提下,我们披露的文件均在加密密钥的保护之下。
-
- 四、我们如何保护和保存您的个人信息
-
- (一)个人信息保护的技术与措施
-
- 1、数据安全技术措施
- 我们已采取符合业界标准、合理可行的安全防护措施保护您提供的个人信息安全,防止个人信息遭到未经授权访问、公开披露、使用、修改、损坏或丢失。我们会使用加密技术(如 TLS、AES 等)、脱敏技术和匿名化技术提高个人信息的安全性;我们会使用受信赖的保护机制防止个人信息遭到恶意攻击;我们会部署访问控制机制,尽力确保只有授权人员才可访问个人信息;部署数据安全监控机制,尽力确保数据在数据生命周期(数据采集、存储、传输、使用、共享和销毁)中得到安全保障。
-
- 2、其他安全措施
- 我们通过建立专门的管理制度、流程和组织以保障个人信息的存储和使用安全;我们通过信息接触者保密协议、监控和审计机制来对数据进行全面安全控制;我们建立信息安全委员会并下设信息保护专职部门、数据安全应急响应组织来推进和保障个人信息安全。;我们建立了信息安全培训体系,通过多种手段对全体员工进行信息安全意识培训,提高员工的信息安全意识以及隐私安全意识,保障会员个人信息安全。
-
- 3、我们仅允许有必要知晓这些信息的蜘蛛管家及蜘蛛管家关联方的员工、合作伙伴访问个人信息,并为此设置了严格的访问权限控制和监控机制。我们同时要求可能接触到您个人信息的所有人员履行相应的保密义务。如果未能履行这些义务,可能会被追究法律责任或被中止与蜘蛛管家的合作关系。
-
- 4、我们会采取一切合理可行的措施,确保未收集无关的个人信息。我们只会在达成本政策所述目的所需的期限内保留您的个人信息,除非需要延长保留期或受到法律的允许。例如《中华人民共和国电子商务法》要求商品和服务信息、交易信息保存时间自交易完成之日起不少于三年。在您的个人信息超出保留期间后,我们会根据适用法律的要求删除您的个人信息,或使其匿名化处理。
-
- 5、互联网并非绝对安全的环境,而且电子邮件、即时通讯、社交软件等与其他用户的交流方式无法确定是否完全加密,我们建议您使用此类工具时请使用复杂密码,并注意保护您的个人信息安全。当您在蜘蛛管家网站与第三方进行网上商品或服务的交易时,您不可避免的要向交易对方或潜在的交易对方披露自己的个人信息,如联络方式或者邮政地址等。请您妥善保护自己的个人信息,仅在必要的情形下向他人提供。
-
- 6、安全应急响应。在不幸发生个人信息安全事件后,我们将按照法律法规的要求,及时向您告知:安全事件的基本情况和可能的影响、我们已采取或将要采取的处置措施、您可自主防范和降低风险的建议、对您的补救措施等。我们同时将及时将事件相关情况以邮件、信函、电话、推送通知等方式告知您,难以逐一告知个人信息主体时,我们会采取合理、有效的方式发布公告。同时,我们还将按照监管部门要求,主动向监管部门上报个人信息安全事件的处置情况。
- 针对个人信息泄露、毁损、丢失等安全风险,我们建立了安全应急响应机制和应急响应团队,从制度层面规范安全事件处置的要求和流程。对安全事件实施分类分级,针对不同事件启动有针对性的安全应急预案,进行事件检测、抑制、根除、恢复、制定补救措施,联合相关部门进行溯源和打击。
-
- 7、如果您对我们的个人信息保护有任何疑问,可通过本政策最下方约定的联系方式联系我们。如您发现自己的个人信息泄露,尤其是您的账户及密码发生泄露,请您立即通过本政策最下方【如何联系我们】约定的联系方式联络我们,以便我们采取相应措施。
-
- (二)个人信息的保存
- 1、您的个人信息将被存储于中华人民共和国境内。如您使用跨境交易服务,且需要向境外传输您的个人信息完成交易的,我们会要求接收方按照我们的说明、本隐私政策以及其他任何相关的保密和安全措施来处理这些个人信息。
-
- 2、请您注意,当您成功申请注销蜘蛛管家账户后,我们将对您的个人信息进行删除或匿名化处理。
-
- 3、如果我们终止服务或运营,我们会至少提前三十日向您通知,并在终止服务或运营后对您的个人信息进行删除或匿名化处理。
-
- 4、我们只会在实现本隐私政策所述目的所需的期限内保留您的个人信息,法律有强制的留存要求的除外,例如《电子商务法》规定商品和服务信息、交易信息保存时间自交易完成之日起不少于三年。
-
- 五、您如何管理您的个人信息
-
- 您可以通过以下方式访问及管理您的个人信息:
-
-
- 1、查阅和更正您的个人信息
- 您有权随时查阅和更正您的个人信息,法律法规规定的例外情况除外,您可以通过以下方式查阅和更正您的个人信息:
- (1) 账户信息:
- 在移动端,您可以在“我的—个人中心—个人信息查看与导出”界面查阅您的个人信息,您可以通过“个人中心—点击蜘蛛管家会员头像”设置您的个人资料(包括头像、昵称、公司名称等);若要修改您的公司信息,可能需要您联系我们客服处理才能更改。
- (2) 在移动端,您可以通过“个人中心”的“商品收藏” “我的足迹”管理您的收藏、浏览足迹信息。
- (3) 您在使用我们的产品与/或服务过程中产生的其他个人信息需要访问或更正,请随时联系我们。我们会根据本隐私政策所列明的方式和期限响应您的请求。
- (4) 无法查阅和更正的个人信息:除上述列明的信息外,您的部分个人信息我们还无法为您提供查阅和更正的服务,这些信息主要是为了提升您的用户体验和保证交易安全所收集的您的设备信息、您使用附加功能时产生的非您主动提交的个人信息。上述信息我们会在您的授权范围内进行使用,您无法查阅和更正,但您可联系我们进行删除或做匿名化处理。
- 2、删除您的个人信息
- 您可以在购物车、个人中心的“商品收藏” “我的足迹”“我的订单”管理或删除您的加购、收藏、浏览足迹、订单信息。您可以在搜索框下方删除或管理您此前输入的搜索关键字信息。
- 在以下情形中,您可以向我们提出删除个人信息的请求:
- (1) 如果我们处理个人信息的行为违反法律法规;
- (2) 如果我们收集、使用您的个人信息,却未征得您的同意;
- (3) 如果我们处理个人信息的行为违反了与您的约定;
- (4) 如果您注销了蜘蛛管家账户;
- (5) 如果我们终止服务及运营;
- (6) 如果我们保存您个人信息的期限已届满。
- 若我们决定响应您的删除请求,我们还将同时通知从我们获得您的个人信息的实体,要求其及时删除,除非法律法规另有规定,或这些实体获得您的独立授权。当您从我们的服务中删除信息后,我们可能不会立即备份系统中删除相应的信息,但会在备份更新时删除这些信息。
-
- 3、改变您授权同意的范围或撤回您的授权
- 您可以通过以下方式改变或者撤回您的授权:
- (1) 您可以通过删除信息、关闭设备功能、在蜘蛛管家网站或软件中通过“隐私设置-系统权限设置”等方式改变您授权我们继续收集个人信息的范围或撤回您的授权。
- (2) 根据您所使用的具体服务,可以通过发送邮件到 huangbin@zzfzyc.com 进行相关请求及操作。我们将会在您做出请求后的合理时间内处理您的请求,并且会根据您的请求,在此后不再收集、使用和/或披露您的个人信息。
- (3) 您也可以通过注销账户的方式,撤回我们继续收集您个人信息的全部授权。
- 请您理解,每个业务功能需要一些基本的个人信息才能得以完成,当您撤回同意或授权后,我们无法继续为您提供撤回同意或授权所对应的服务,也不再处理您相应的个人信息。但您撤回同意或授权的决定,不会影响此前基于您的授权而开展的个人信息处理。
- 为确保您的信息安全,您向我们提出请求时应向我们提供必要的基础信息用于初步核验您的真实身份,并核验请求人和注册用户之间的同一性。
-
- 4、响应您的上述请求
- 如果您无法通过上述方式查阅、更正或删除您的个人信息,或您需要查阅、更正或删除您在使用我们产品与/或服务时所产生的其他个人信息,或您认为蜘蛛管家存在任何违反法律法规或与您关于个人信息的收集或使用的约定,您均可以通过本协议下方的方式与我们联系。为了保障安全,我们可能需要您提供书面请求,或以其他方式证明您的身份,我们将在收到您反馈并验证您的身份后的 15 天内答复您的请求。对于您合理的请求,我们原则上不收取费用,但对多次重复、超出合理限度的请求,我们将视情况收取一定成本费用。对于那些无端重复、需要过多技术手段(例如,需要开发新系统或从根本上改变现行惯例)、给他人合法权益带来风险或者非常不切实际(例如,涉及备份磁带上存放的信息)的请求,我们可能会予以拒绝。
- 在以下情形中,按照法律法规要求,我们将无法响应您的请求:
- (1) 与国家安全、国防安全有关的;
- (2) 与公共安全、公共卫生、重大公共利益有关的;
- (3) 与犯罪侦查、起诉和审判等有关的;
- (4) 有充分证据表明您存在主观恶意或滥用权利的;
- (5) 响应您的请求将导致您或其他个人、组织的合法权益受到严重损害的。
-
- 六、我们如何处理未成年人的个人信息
-
- 1、在电子商务活动中我们推定您具有相应的民事行为能力。若您是 18 周岁以下的未成年人,在使用我们的产品与/或服务前,应事先取得您监护人的同意。
-
- 2、如果有事实证明未成年人在未取得监护人同意的情况下注册使用了我们的产品与/或服务,我们会与相关监护人协商,并设法尽快删除相关个人信息。
- 七、您的个人信息如何在全球范围转移
- 原则上,我们在中华人民共和国境内运营中收集和产生的个人信息,将存储在中华人民共和国境内,以下情形除外:
- 1、适用的法律有明确规定;
- 2、获得您的单独同意;
- 3、您通过互联网进行跨境交易等个人主动行为。
- 针对以上情形,我们会确保依据本隐私政策对您的个人信息提供足够的保护。
- 八、通知和修订
- 1、为给您提供更好的服务以及随着蜘蛛管家业务的发展,本隐私政策也会随之更新。但未经您明确同意,我们不会削减您依据本隐私政策所应享有的权利。我们会通过在蜘蛛管家网站、蜘蛛管家移动端上发出更新版本并在生效前通过网站公告或以其他适当方式提醒您相关内容的更新,也请您访问蜘蛛管家以便及时了解最新的隐私政策。
- 2、对于重大变更,我们还会提供更为显著的通知(我们会通过包括但不限于邮件、短信或在浏览页面做特别提示等方式,说明隐私政策的具体变更内容)。
- 本政策所指的重大变更包括但不限于:
- (1) 我们的服务模式发生重大变化。如处理个人信息的目的、处理的个人信息类型、个人信息的使用方式等;
- (2) 我们在所有权结构、组织架构等方面发生重大变化。如业务调整、破产并购等引起的所有者变更等;
- (3) 个人信息共享、转让或公开披露的主要对象发生变化;
- (4) 您参与个人信息处理方面的权利及其行使方式发生重大变化;
- (5) 我们负责处理个人信息安全的责任部门、联络方式及投诉渠道发生变化时;
- (6) 个人信息安全影响评估报告表明存在高风险时。
- 3、我们还会将本策略的旧版本存档,供您查阅。
- 4、为了您能及时接收到通知,建议您在联系方式更新时及时通知我们。如您在本政策更新生效后继续使用我们的服务,即代表您已充分阅读、理解并接受更新后的政策并愿意受更新后的政策约束。我们鼓励您在每次使用我们服务时都查阅本政策。您可以在我们的产品和服务中通过“我的--设置--隐私--隐私政策”中查看本政策。
- 九、如何联系我们
- 1、如您对本隐私政策或您个人信息的相关事宜有任何问题、意见或建议,请线上联系蜘蛛管家客服进行进行咨询。如您需要获取具体个人信息副本,您可以通过发送邮件至我们专门的个人信息保护邮箱 huangbin@zzfzyc.com 的方式与我们联系。
- 2、蜘蛛管家平台运营者为佛山市浩川长盛科技有限公司,注册地址为佛山市禅城区华宝南路13号佛山国家火炬创新创业园E座4楼408室。
- 3、一般情况下,我们将在十五天内回复。如果您对我们的回复不满意,特别是我们的个人信息处理行为损害了您的合法权益,您还可以向网信、电信、公安及工商等监管部门进行投诉或举报,或通过向被告住所地有管辖权的法院提起诉讼来寻求解决方案。
-
`
-
- const titles = { clause: { title: '服务条款', value: clause }, policy: { title: '隐私政策', value: policy } }
- const router = useRouter()
- useEffect(() => {
- Taro.setNavigationBarTitle({
- title: titles[router.params.type || 'clause'].title,
- })
- }, [router])
- return
-
-
-}
-
-export default ClauseDetail
diff --git a/src/pages/collectionDetail/components/form/index.module.scss b/src/pages/collectionDetail/components/form/index.module.scss
deleted file mode 100644
index 722e19d..0000000
--- a/src/pages/collectionDetail/components/form/index.module.scss
+++ /dev/null
@@ -1,97 +0,0 @@
-.itemBox {
- width: 100%;
- border-bottom: 1px solid #f7f7f7;
- display: flex;
- // align-items: center;
- padding-top: 30px;
- padding-bottom: 30px;
-
- .itemLeft {
-
- // align-items: center;
- .finkFlex {
- display: flex;
-
- .itemTitle {
- font-size: 28px;
- font-weight: 500;
- color: #000000;
- }
-
- .xing {
- font-size: 28px;
- font-weight: 500;
- color: #E42945;
- margin-right: 48px;
- }
- }
-
- .finkFont {
- font-size: 20px;
- font-weight: 400;
- color: grey;
- }
-
-
- }
-
- .bigPic {
- width: 70%;
- }
-
- .itemRight {
- // display: flex;
- // align-items: center;
- // justify-content: space-between;
- width: 70%;
- // position: relative;
-
- .assginFont {
- // position: absolute;
- // bottom: 10px;
- // left: 0px;
- font-size: 24px;
- font-weight: 500;
- color: #000000;
- }
-
- .rightFlex {
- .placeholderStyle {
- color: #f7f7f7;
- font-size: 28px;
- font-weight: 400;
- }
-
- .inputStyle {
- font-size: 28px;
- font-weight: 400;
- color: #000000;
- width: 100%;
- }
- }
-
- .iconFlex {
- display: flex;
- align-items: center;
-
- .chakanquanbukehu2 {
- font-size: 50px !important;
- }
-
- .shu {
- width: 2px;
- height: 36px;
- background: #000000;
- opacity: 0.2;
- margin-left: 24px;
- }
-
- .saomiao {
- margin-left: 24px;
- color: #087EFF;
- font-size: 40px !important;
- }
- }
-
- }
-}
diff --git a/src/pages/collectionDetail/components/form/index.tsx b/src/pages/collectionDetail/components/form/index.tsx
deleted file mode 100644
index 8744cb0..0000000
--- a/src/pages/collectionDetail/components/form/index.tsx
+++ /dev/null
@@ -1,101 +0,0 @@
-import { Input, ScrollView, Text, View } from '@tarojs/components'
-import Taro from '@tarojs/taro'
-import { memo, useCallback, useEffect, useMemo, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-// import BottomBtns from '@/components/BottomBtns'
-import { formatDateTime, formatPriceDiv } from '@/common/format'
-import IconFont from '@/components/iconfont/iconfont'
-import UploadImage from '@/components/uploadImage'
-
-interface Params {
- title?: string // 传入的名称
- require?: boolean // 是否显示必须选填的内容图标
- isInput?: boolean // 是否显示输入框
- inputValue?: string // 输入框的值
- inputType?: any // 输入框类型
- getInput?: (any) => void // 输入框回调
- showScan?: boolean // 是否显示扫描图标
- placeholderFont?: string // 输入框默认文本
- showMore?: boolean // 是否显示更多图标
- disabled?: boolean // 是否输入框禁止
- onlyRead?: boolean // 图片是否只读
- showPic?: boolean // 是否显示图片组件
- getImageList?: (any) => void // 上传图片回调
- PicList?: any[] // 默认图片列表
- styleNone?: boolean // 根据不同的栏目调整样式
- getScan?: (any) => void // 扫描
- navTo?: () => void // 跳转选择
- showSizeFont?: boolean // 展示金额的大写
- bigMoney?: any // 展示的大写金额
-}
-const Form = (pros: Params) => {
- return (
-
-
-
- {pros.title}
- {
- pros.require && *
- }
-
- {
- pros.showSizeFont && 展示大小写
- }
-
- {
- pros.showPic
- &&
-
-
- }
- {
- !pros.showPic && pros.navTo?.()}
- style={{
- justifyContent: `${!pros.showSizeFont ? 'space-between' : ''}`,
- alignItems: `${!pros.showSizeFont ? 'center' : ''}`,
- display: `${!pros.showSizeFont ? 'flex' : ''}`,
- }}
- >
-
- {
- pros.isInput && pros.getInput?.(e.detail.value)}
- >
- }
- {
- !pros.isInput && {pros.inputValue}
- }
-
-
-
- {
- pros.showMore &&
-
- }
- {
- pros.showScan &&
-
- }
- {
- pros.showScan && pros.getScan?.(e)}>
-
- }
- {
- pros.showSizeFont && {pros.bigMoney}
- }
-
- }
-
-
- )
-}
-export default memo(Form)
diff --git a/src/pages/collectionDetail/index.config.ts b/src/pages/collectionDetail/index.config.ts
deleted file mode 100644
index 1c66055..0000000
--- a/src/pages/collectionDetail/index.config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export default {
- navigationBarTitleText: '收款单详情',
-}
diff --git a/src/pages/collectionDetail/index.module.scss b/src/pages/collectionDetail/index.module.scss
deleted file mode 100644
index 31b999e..0000000
--- a/src/pages/collectionDetail/index.module.scss
+++ /dev/null
@@ -1,105 +0,0 @@
-.addBox {
- margin: 24px;
- padding: 0px 32px 40px 32px;
- background: #ffffff;
- border-radius: 16px 16px 0px 0px;
- transition: 0.3s;
-}
-
-.textAreaBox {
- margin-top: 40px;
- display: flex;
- justify-content: space-between;
- position: relative;
- border-bottom: 1px solid #f7f7f7;
- padding-bottom: 47px;
-
- .textAreaLeft {
- font-size: 28px;
- font-weight: 500;
- color: #000000;
- }
-
- .textAreaRight {
- width: 70%;
- font-size: 28px;
- }
-
- .numsTotal {
- position: absolute;
- bottom: 0;
- right: 0;
- display: flex;
- font-size: 28px;
- font-weight: 400;
- color: #000000;
- }
-}
-
-.msgBox {
- width: 100%;
- border-bottom: 1px solid #f7f7f7;
- display: flex;
- align-items: center;
- padding-top: 40px;
- padding-bottom: 40px;
- justify-content: space-between;
-
- .msgLeft {
- font-size: 28px;
- font-weight: 500;
- color: #000000;
- }
-
- .msgFlex {
- width: 70%;
- display: flex;
- justify-content: space-between;
-
- .msgName {
- font-size: 28px;
- font-weight: 400;
- color: #000000;
- }
-
- .msgTime {
- font-size: 28px;
- font-weight: 400;
- color: #000000;
- }
- }
-}
-
-.topBox {
- background: #ffffff;
- margin: 24px;
- justify-content: center;
- display: flex;
- align-items: center;
- flex-direction: column;
- overflow: hidden;
-
- .topFont {
- margin-top: 32px;
- font-size: 28px;
- font-weight: 500;
- color: #000000;
- margin-bottom: 16px;
- }
-
- .topMon {
- font-size: 64px;
- font-weight: 500;
- color: #333333;
- letter-spacing: 4px;
- margin-bottom: 8px;
- }
-
- .topBigMon {
- font-size: 24px;
- font-weight: 400;
- color: #000000;
- letter-spacing: 11px;
- margin-bottom: 38px;
- }
-}
diff --git a/src/pages/collectionDetail/index.tsx b/src/pages/collectionDetail/index.tsx
deleted file mode 100644
index f1fbd76..0000000
--- a/src/pages/collectionDetail/index.tsx
+++ /dev/null
@@ -1,140 +0,0 @@
-import { Button, Input, Textarea, View } from '@tarojs/components'
-import Taro, { faceVerifyForPay, useDidShow, useRouter } from '@tarojs/taro'
-import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import dayjs from 'dayjs'
-import styles from './index.module.scss'
-import Form from './components/form'
-import Search from '@/components/search'
-import { dataLoadingStatus, getFilterData } from '@/common/util'
-import Popup from '@/components/popup'
-import InfiniteScroll from '@/components/infiniteScroll'
-import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/format'
-import {
- MpCashManagementOrder,
-} from '@/api/newCollection'
-import smallToBig from '@/common/money'
-
-const CollectionDetail = () => {
- const router = useRouter()
- const [Query, setQuery] = useState({})
- const { fetchData: getFetch } = MpCashManagementOrder()
-
- const getDetail = async() => {
- Taro.showLoading({
- title: '请稍等',
- mask: true,
- })
- const res = await getFetch({ id: Number(router.params.id) })
- if (res.data) {
- // res.data?.payment_credential_url?.map(it => {
- // it = IMG_CND_Prefix + it
- // return it
- // })
- Taro.hideLoading()
- setQuery(res.data)
- }
- }
-
- useEffect(() => {
- setQuery(Query)
- }, [Query])
-
- const money = useMemo(() => {
- let res = 0
- res = Query.receipt_amount / 100
- return res
- }, [Query])
- useEffect(() => {
- getDetail()
- }, [])
- return (
- <>
-
- 收款金额(元)
- {money}
- {smallToBig(typeof (money) == 'undefined' ? 0 : money)}
-
-
-
- 订单编号
-
- {Query.order_no}
- {Query.auditor_status_name}
-
-
-
- {/* */}
-
-
-
- 备注信息
- { Query.remark }
-
-
- 创建信息
-
- {Query.creator_name}
- {formatDateTime(Query.create_time)}
-
-
-
- 审核信息
-
- {Query.auditor_name}
- {formatDateTime(Query.audit_time)}
-
-
-
-
- >
- )
-}
-
-export default CollectionDetail
diff --git a/src/pages/colorRelated/components/bluetooth/LinkBlueTooth.tsx b/src/pages/colorRelated/components/bluetooth/LinkBlueTooth.tsx
deleted file mode 100644
index 78d935d..0000000
--- a/src/pages/colorRelated/components/bluetooth/LinkBlueTooth.tsx
+++ /dev/null
@@ -1,87 +0,0 @@
-import { View } from '@tarojs/components'
-import Taro from '@tarojs/taro'
-import { memo, useEffect, useMemo, useState } from 'react'
-import classnames from 'classnames'
-import styles from '../css/linkBlueTooth.module.scss'
-import Popup from './Popup'
-import { useBluetooth } from '@/use/contextBlueTooth'
-import SearchInput from '@/components/searchInput'
-
-const LinkBlueTooth = () => {
- const { state, init, startScan, connect, disconnect } = useBluetooth()
-
- useEffect(() => {
- init()
- }, [])
-
- const [linkStatus, setLinkStatus] = useState(1)
- useEffect(() => {
- if (!state.available) {
- setLinkStatus(1)
- }
- else if (state.available && state.connected?.name) {
- setLinkStatus(3)
- }
- else {
- setLinkStatus(2)
- }
- }, [state.available, state.connected])
-
- const linkName = useMemo(() => {
- console.log('state linkName', state)
- return state.connected?.localName || ''
- }, [state.connected])
-
- // 链接设备
- const onLinkListen = (item) => {
- if (!state.connected && !state.connecting) { connect(item) }
- }
- const onFindEven = () => {
- if (!state.discovering && !state.connected && !state.connecting) { startScan() }
- }
- const [popupShow, setPopupShow] = useState(false)
- // 显示设备列表
- const onFindDevice = () => {
- console.log('linkStatus==>', linkStatus)
- if (linkStatus == 1) {
- Taro.showToast({
- title: '请打开蓝牙',
- icon: 'none',
- })
- }
- else {
- setPopupShow(true)
- onFindEven()
- }
- }
-
- // 断开链接
- const onDisconnect = () => {
- disconnect()
- setPopupShow(false)
- }
-
- return (
- <>
-
-
-
-
- {(linkStatus == 1 && 请开启蓝牙)
- || (linkStatus == 2 && 未连接设备)
- || (linkStatus == 3 && {linkName})}
-
-
- setPopupShow(false)}
- onLink={item => onLinkListen(item)}
- onOff={onDisconnect}
- onFind={onFindEven}
- />
-
- >
- )
-}
-export default memo(LinkBlueTooth)
diff --git a/src/pages/colorRelated/components/bluetooth/Popup.tsx b/src/pages/colorRelated/components/bluetooth/Popup.tsx
deleted file mode 100644
index 8eb06a7..0000000
--- a/src/pages/colorRelated/components/bluetooth/Popup.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-import { ScrollView, View } from '@tarojs/components'
-import { memo, useEffect, useState } from 'react'
-import style from '../css/popup.module.scss'
-import Loading from '@/components/loading'
-
-interface params {
- state: any
- show: Boolean
- onClose: (Boolean) => void
- onLink: (any) => void
- children?: React.ReactNode
- onOff: () => void
- onFind: () => void
-}
-const Popup = ({ state, show = false, onClose, onLink, onOff, onFind }: params) => {
- const [popupShow, setPopupShow] = useState(show)
- useEffect(() => {
- setPopupShow(show)
- }, [show])
- const onCloseListener = () => {
- onClose(false)
- }
-
- return (
- <>
- {popupShow && (
-
-
- 搜索设备
-
-
- {(state.devices
- && state.devices.length > 0
- && state?.devices.map((item, key) => {
- return (
- onLink(item)}>
- {item.name}
- {(!state.connecting && !state.connected && 链接)
- || (state.connecting && item.deviceId == state.connecting.deviceId && 正在链接...)
- || (state.connected && item.deviceId == state.connected.deviceId && 链接成功)}
-
- )
- })) || (
-
- {(!state.discovering && (
- <>
- 暂无设备,请按以下条件检查
- 1.请确保取色仪处于激活状态
- 2.请确保取色仪没有链接其他设备
- 3.请打开手机定位
- >
- )) || 设备搜索中}
-
- )}
-
-
- {(state.connected && (
-
- 断开链接
-
- ))
- || (!state.connected && state.discovering && (
-
- 搜索中
-
-
- )) || (
-
- 重新搜索
-
- )}
-
-
-
- )}
- >
- )
-}
-export default memo(Popup)
diff --git a/src/pages/colorRelated/components/css/linkBlueTooth.module.scss b/src/pages/colorRelated/components/css/linkBlueTooth.module.scss
deleted file mode 100644
index ef9d9c2..0000000
--- a/src/pages/colorRelated/components/css/linkBlueTooth.module.scss
+++ /dev/null
@@ -1,40 +0,0 @@
-.main {
- width: 100%;
- background: #ffffff;
- border-radius: 10px;
-
- .bluetooth_link {
- width: 100%;
- display: flex;
- align-items: center;
-
- .link_status {
- width: 12px;
- height: 12px;
- background: #f02409;
- border-radius: 50%;
- }
-
- .link_statused {
- background: #07C160;
- }
-
- .link_statused_no {
- background: #f0ec09;
- }
-
- .link_name {
- font-size: $font_size;
- margin-left: 20px;
-
- }
-
- .link_name_no {
- color: #f02409;
- }
-
- .link_name_no_link {
- color: #f0ec09;
- }
- }
-}
diff --git a/src/pages/colorRelated/components/css/popup.module.scss b/src/pages/colorRelated/components/css/popup.module.scss
deleted file mode 100644
index d6c273f..0000000
--- a/src/pages/colorRelated/components/css/popup.module.scss
+++ /dev/null
@@ -1,90 +0,0 @@
-.popup{
- width: 100vw;
- height: 100vh;
- position: absolute;
- top: 0;
- left: 0;
- .mask{
- width: 100%;
- height: 100%;
- background-color: rgba(0,0,0,0.5);
- position: fixed;
- top:0;
- left:0;
- z-index: 9;
- }
- .content{
- z-index: 99;
- background-color: #fff;
- width: 75vw;
- height: 600px;
- position: fixed;
- top: 50%;
- left: 50%;
- border-radius: 20px;
- transform: translateX(-50%) translateY(-50%);
- display: flex;
- flex-direction: column;
- font-size: 28px;
- .title{
- text-align: center;
- margin: 20px;
- }
- .list{
- height: 480px;
- padding: 0 20px;
- .scroll{
- height: 100%;
- }
- .item{
- margin-bottom: 20px;
- display: flex;
- justify-content: space-between;
- border-bottom: 1px dashed #ccc;
- padding: 15px 0;
- color: #3b3b3b;
- @mixin link{
- font-size: 25px;
- }
- .link_success{
- @include link;
- color: green;
- }
- .link_ing {
- color: orange;
- }
- }
- .noDevice{
- height: 100%;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- color: #a8a8a8;
- .n_item{
- width: 100%;
- text-align: left;
- margin-top: 20px;
- padding: 0 30px;
- box-sizing: border-box;
- }
- }
-
- }
- .footer{
- text-align: center;
- padding: 20px 0;
- background-color: #f1f1f1;
- border-radius: 0 0 10px 10px;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .finding{
- color: orange;
- }
- .footer_off{
- color: red;
- }
- }
-}
diff --git a/src/pages/colorRelated/findColor/components/DrawerCenter/index.module.scss b/src/pages/colorRelated/findColor/components/DrawerCenter/index.module.scss
deleted file mode 100644
index 2fe9efc..0000000
--- a/src/pages/colorRelated/findColor/components/DrawerCenter/index.module.scss
+++ /dev/null
@@ -1,46 +0,0 @@
-.popups {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100vh;
- .cover {
- position: fixed;
- height: 100vh;
- width: 100vw;
- top: 0;
- left: 0;
- background: rgba(0, 0, 0, 0.5);
- z-index: 10;
- }
- .popcoms {
- z-index: 100;
- position: fixed;
- top: 50%;
- left: 50%;
- border-radius: 20px;
- transform: translateX(-50%) translateY(-50%);
- .con {
- width: 500px;
- height: 100%;
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .showRgb {
- width: 100%;
- height: 550px;
- background-color: #fff;
- border-radius: 20px;
- }
- .name {
- width: 100%;
- text-align: center;
- color: #fff;
- padding: 20px 0;
- font-size: 26px;
- background: rgba(0, 0, 0, 0.5);
- border-radius: 20px;
- }
- }
-}
diff --git a/src/pages/colorRelated/findColor/components/DrawerCenter/index.tsx b/src/pages/colorRelated/findColor/components/DrawerCenter/index.tsx
deleted file mode 100644
index 6592ada..0000000
--- a/src/pages/colorRelated/findColor/components/DrawerCenter/index.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import { View } from '@tarojs/components'
-import type { FC } from 'react'
-import React, { memo, useEffect, useState } from 'react'
-import styles from './index.module.scss'
-
-interface PropsType {
- showModal: boolean
- children?: React.ReactNode
-}
-
-const DrawerCenter: FC = (props) => {
- const { children, showModal } = props
-
- const [show, setShow] = useState(false)
-
- useEffect(() => {
- setShow(showModal)
- }, [showModal])
- // 关闭
- const close = () => {
- setShow(false)
- }
-
- return show
- ? (
-
- {children}
-
-
- )
- : null
-}
-export default memo(DrawerCenter)
diff --git a/src/pages/colorRelated/findColor/components/HistoryColor/index.module.scss b/src/pages/colorRelated/findColor/components/HistoryColor/index.module.scss
deleted file mode 100644
index 753d211..0000000
--- a/src/pages/colorRelated/findColor/components/HistoryColor/index.module.scss
+++ /dev/null
@@ -1,113 +0,0 @@
-
-.history_color {
- .selectCon {
- display: flex;
- flex-direction: column;
- align-items: center;
- height: 100%;
- .selectList {
- width: 692px;
- height: 230px;
- background: #ffffff;
- border-radius: 30px;
- margin-bottom: 20px;
- display: flex;
- align-items: center;
- padding: 20px 0;
- box-sizing: border-box;
- .rgbColor {
- width: 161px;
- height: 161px;
- background: red;
- border-radius: 50%;
- margin-left: 30px;
- box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.6);
- }
- .product_con {
- display: flex;
- flex-direction: column;
- justify-content: center;
- margin-left: 32px;
- font-size: 26px;
- height: 100%;
- width: 300px;
- color: #505050;
- .product_name {
- @include common_ellipsis();
- font-size: 28px;
- color: #5f5f5f;
- font-weight: 700;
- margin-bottom: 46px;
- }
- .product_color {
- @include common_ellipsis();
- margin-bottom: 15px;
- }
- .contrast {
- display: flex;
- margin-bottom: 20px;
- .g_num {
- @include common_ellipsis();
- }
- .num {
- color: #00499f;
- background: #c9e4ff;
- padding: 3px 10px;
- border-radius: 7px;
- margin-left: 18px;
- }
- }
- .date {
- background: rgba(0, 0, 0, 0.3);
- color: #fff;
- padding: 3px 10px;
- border-radius: 10px;
- width: 258px;
- }
- }
- .labColor {
- flex: 1;
- // height: 100%;
- display: flex;
- flex-direction: column;
- align-items: center;
- font-size: 27px;
- color: #707070;
- .labColor_btn {
- width: 47px;
- height: 47px;
- background: #007aff;
- color: #fff;
- text-align: center;
- line-height: 47px;
- border-radius: 50%;
- font-size: 39px;
- margin-bottom: 20px;
- }
- .labColor_con {
- flex: 1;
- .L,
- .a {
- margin-bottom: 10px;
- }
- }
- }
- }
- .noData {
- display: flex;
- justify-content: center;
- align-items: center;
- color: #707070;
- height: 100%;
- width: 100%;
- font-size: 26px;
- }
- }
- .selectList-scroll-color {
- height: 70vh;
- width: 100%;
- }
- .drawer-container {
- background: #f0f0f0;
- }
-}
diff --git a/src/pages/colorRelated/findColor/components/HistoryColor/index.tsx b/src/pages/colorRelated/findColor/components/HistoryColor/index.tsx
deleted file mode 100644
index 9b20e9d..0000000
--- a/src/pages/colorRelated/findColor/components/HistoryColor/index.tsx
+++ /dev/null
@@ -1,118 +0,0 @@
-import { ScrollView, View } from '@tarojs/components'
-import Taro from '@tarojs/taro'
-import type { FC } from 'react'
-import { forwardRef, useEffect, useImperativeHandle, useState } from 'react'
-import styles from './index.module.scss'
-import Popup from '@/components/popup'
-import { formatDateTime, formatHashTag } from '@/common/format'
-import { toRgb } from '@/common/bluetooth/color/colorSpace'
-import { usePropsValue } from '@/use/useCommon'
-
-interface PropsType {
- showModal: boolean
- onVisibleChange?: (visible: boolean) => void
- onColor?: Function
-}
-interface HistoryListItem {
- p_time: number
- lab: number[]
- code: string
- name: string
-}
-const HistoryColor = (props: PropsType, ref) => {
- const { onColor, showModal, onVisibleChange } = props
-
- const [visible, setVisible] = usePropsValue({
- value: showModal,
- defaultValue: showModal,
- onChange: onVisibleChange,
- })
-
- useImperativeHandle(
- ref,
- () => {
- return {
- show: () => setVisible(true),
- hide: () => setVisible(false),
- visible,
- }
- },
- [visible],
- )
-
- const closeEven = () => {
- console.log('closeEven')
- setVisible(false)
- }
- const [list, setList] = useState([])
-
- // 获取本地列表(无差别存储版本)
- const getList = () => {
- const historyColorList = Taro.getStorageSync('historyColor')
- console.log('historyColorList==>', historyColorList)
- setList(historyColorList || [])
- }
- useEffect(() => {
- if (visible) {
- getList()
- }
- }, [visible])
-
- // 保留1位小数
- const noScale = (val, num = 1) => {
- return val?.toFixed(num)
- }
- // rgb转换字符串
- const labRoRgb = (val) => {
- const rgb = toRgb(val)
- return `rgb(${rgb[0]},${rgb[1]},${rgb[2]})`
- }
-
- const getInfo = (val) => {
- const index = list.findIndex(item => item.p_time == val.p_time)
- const tempList = JSON.parse(JSON.stringify(list))
- tempList.splice(index, 1)
- tempList.unshift(val)
- setList(tempList)
- Taro.setStorageSync('historyColor', tempList)
- onColor && onColor(val)
- setVisible(false)
- }
-
- return (
-
-
-
-
- {list?.length
- ? (
- list.map((item, index) => {
- return (
- getInfo(item)}>
-
-
- {formatHashTag(item.code, item.name)}
- {formatDateTime(item.p_time)}
-
-
- +
-
- L*:{noScale(item.lab[0])}
- a*:{noScale(item.lab[1])}
- b*:{noScale(item.lab[2])}
-
-
-
- )
- })
- )
- : (
- 暂无数据
- )}
-
-
-
-
- )
-}
-export default forwardRef(HistoryColor)
diff --git a/src/pages/colorRelated/findColor/components/LabColor/index.module.scss b/src/pages/colorRelated/findColor/components/LabColor/index.module.scss
deleted file mode 100644
index 22da60f..0000000
--- a/src/pages/colorRelated/findColor/components/LabColor/index.module.scss
+++ /dev/null
@@ -1,46 +0,0 @@
-.lab_color_main {
- display: flex;
- justify-content: space-between;
- padding: 20px 0;
- font-size: 28px;
- .btnColor {
- width: 264px;
- height: 264px;
- background: #dddddd;
- border-radius: 50%;
- text-align: center;
- line-height: 264px;
- color: #707070;
- box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.6);
- }
- .labCon {
- display: flex;
- flex-direction: column;
- justify-content: center;
- padding: 20px 0 20px 20px;
- color: #707070;
- .lab {
- color: #707070;
- display: flex;
- margin-bottom: 20px;
- text {
- display: flex;
- &:nth-child(1) {
- font-weight: 700;
- }
- &:nth-child(n + 2) {
- background-color: #fff;
- margin-left: 17px;
- padding: 3px 15px;
- border-radius: 10px;
- width: 73px;
- display: flex;
- justify-content: center;
- }
- }
- }
- .date {
- font-size: 26px;
- }
- }
-}
diff --git a/src/pages/colorRelated/findColor/components/LabColor/index.tsx b/src/pages/colorRelated/findColor/components/LabColor/index.tsx
deleted file mode 100644
index f0cd325..0000000
--- a/src/pages/colorRelated/findColor/components/LabColor/index.tsx
+++ /dev/null
@@ -1,55 +0,0 @@
-import { Text, View } from '@tarojs/components'
-import type { FC } from 'react'
-import { useMemo } from 'react'
-import styles from './index.module.scss'
-import { toRgb } from '@/common/bluetooth/color/colorSpace'
-import { formatDateTime } from '@/common/format'
-
-interface PropsType {
- lab?: Array
- time?: any
- onLab?: Function
-}
-
-const LabColor: FC = (props) => {
- const { lab = [], time, onLab } = props
- const noScale = (val, num = 1) => {
- return val.toFixed(num)
- }
-
- const labObj = useMemo(() => {
- if (lab.length <= 0) { return { lab: [], rgb: '' } }
- const rgb = toRgb(lab)
- return {
- lab: [noScale(lab[0]), noScale(lab[1]), noScale(lab[2])],
- rgb: `rgb(${rgb[0]},${rgb[1]},${rgb[2]})`,
- }
- }, [lab])
-
- const labTime = useMemo(() => {
- if (time.length <= 0) { return '' }
- return formatDateTime(time)
- }, [time])
-
- const onLabEven = () => {
- onLab && onLab()
- }
-
- return (
-
-
- {labObj.lab.length ? '' : '点击取色'}
-
-
-
- L*a*b*:
- {labObj.lab[0]}
- {labObj.lab[1]}
- {labObj.lab[2]}
-
- {labTime && 取样时间: {labTime}}
-
-
- )
-}
-export default LabColor
diff --git a/src/pages/colorRelated/findColor/components/RecommendColor/index.module.scss b/src/pages/colorRelated/findColor/components/RecommendColor/index.module.scss
deleted file mode 100644
index a994187..0000000
--- a/src/pages/colorRelated/findColor/components/RecommendColor/index.module.scss
+++ /dev/null
@@ -1,125 +0,0 @@
-.RecommendColor_main {
- width: 100%;
- .RecommendColor_list {
- display: flex;
- flex-wrap: wrap;
- .RecommendColor_item {
- background: #fff;
- width: 48.5%;
- height: 356px;
- border-radius: 30px;
- margin-bottom: 20px;
- &:nth-child(2n) {
- margin-left: 3%;
- }
- .rgbColor {
- width: 100%;
- height: 188px;
- background: rgb(0, 195, 255);
- border-radius: 30px 30px 0 0;
- position: relative;
- .lab {
- width: 90px;
- height: 100%;
- background: rgba(0, 0, 0, 0.3);
- position: absolute;
- right: 0;
- top: 0;
- border-radius: 0 30px 0 0;
- color: #fff;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- font-size: 26px;
- text {
- &:nth-child(1) {
- font-weight: 700;
- margin-bottom: 10px;
- }
- }
- }
- }
- .product_con {
- display: flex;
- flex-direction: column;
- font-size: 26px;
- padding: 10px 15px 15px 15px;
- box-sizing: border-box;
- .product_color {
- color: #505050;
- @include common_ellipsis();
- }
- .product_title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .product_name {
- @include common_ellipsis(2);
- color: #0c68c5;
- font-weight: 700;
- font-size: 28px;
- flex: 1;
- margin-right: 10px;
- }
- .product_num {
- display: flex;
- justify-content: center;
- align-items: center;
- background: #c9e4ff;
- color: #00499f;
- padding: 3px 6px;
- font-size: 26px;
- border-radius: 5px;
- margin-bottom: 13px;
- }
- }
- .date {
- margin-top: 15px;
- color: #808080;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .labColor_btn {
- width: 47px;
- height: 47px;
- background: #007aff;
- color: #fff;
- text-align: center;
- line-height: 47px;
- border-radius: 50%;
- font-size: 39px;
- margin-right: 10px;
- }
- .g_num {
- flex: 1;
- margin-right: 10px;
- @include common_ellipsis();
- }
- }
- }
- }
- }
- .con {
- width: 500px;
- height: 100%;
- display: flex;
- flex-direction: column;
- align-items: center;
- .showRgb {
- width: 100%;
- height: 550px;
- background-color: #fff;
- border-radius: 20px;
- }
- .name {
- width: 100%;
- text-align: center;
- color: #fff;
- padding: 20px 0;
- font-size: 26px;
- background: rgba(0, 0, 0, 0.5);
- border-radius: 20px;
- }
- }
-}
diff --git a/src/pages/colorRelated/findColor/components/RecommendColor/index.tsx b/src/pages/colorRelated/findColor/components/RecommendColor/index.tsx
deleted file mode 100644
index 34606b5..0000000
--- a/src/pages/colorRelated/findColor/components/RecommendColor/index.tsx
+++ /dev/null
@@ -1,82 +0,0 @@
-import { Text, View } from '@tarojs/components'
-import type { FC } from 'react'
-import { useState } from 'react'
-import classnames from 'classnames'
-import DrawerCenter from '../DrawerCenter'
-import styles from './index.module.scss'
-import { toRgb } from '@/common/bluetooth/color/colorSpace'
-import { formatDateTime } from '@/common/format'
-
-interface PropsType {
- list?: Array
- customStyle?: React.CSSProperties
-}
-
-const RecommendColor: FC = (props) => {
- const { list, customStyle = {} } = props
-
- // rgb转换字符串
- const labRoRgb = (val) => {
- const lab = val ? [val.l, val.a, val.b] : []
- const rgb = toRgb(lab)
- return `rgb(${rgb[0]},${rgb[1]},${rgb[2]})`
- }
-
- // 保留1位小数
- const noScale = (val, num = 1) => {
- return val.toFixed(num)
- }
-
- const [show, setShow] = useState(false)
- const [selectObj, setSelectObj] = useState({
- rgb: '',
- product_color_code: '',
- product_color_name: '',
- })
-
- const openShow = (val) => {
- setShow(true)
- setSelectObj(val)
- setSelectObj({ ...val, rgb: labRoRgb(val.lab) })
- }
-
- return (
-
-
- {list?.map((item) => {
- return (
- openShow(item)}>
-
-
- L*a*b*
- {noScale(item.lab.l)}
- {noScale(item.lab.a)}
- {noScale(item.lab.b)}
-
-
-
-
- {`${item.product_code}# ${item.product_name}`}
- {noScale(item.match_rate_percent, 1)}%
-
- {`${item.product_color_code} ${item.product_color_name}`}
-
- {item.dyelot_number}
- +
-
-
-
- )
- })}
-
-
-
-
-
- {`${selectObj.product_color_code} ${selectObj.product_color_name}`}
-
-
-
- )
-}
-export default RecommendColor
diff --git a/src/pages/colorRelated/findColor/index.config.ts b/src/pages/colorRelated/findColor/index.config.ts
deleted file mode 100644
index f3418f1..0000000
--- a/src/pages/colorRelated/findColor/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '取色查找',
- enableShareAppMessage: false,
-}
diff --git a/src/pages/colorRelated/findColor/index.module.scss b/src/pages/colorRelated/findColor/index.module.scss
deleted file mode 100644
index a9abbf6..0000000
--- a/src/pages/colorRelated/findColor/index.module.scss
+++ /dev/null
@@ -1,94 +0,0 @@
-page {
- height: 100vh;
-}
-.findColor_main {
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 20px;
- min-height: 100%;
- background: #f3f3f3;
- box-sizing: border-box;
- .findColor_main_search {
- background: #fff;
- width: 100%;
- padding: 0 20rpx;
- border-radius: 20rpx;
- box-sizing: border-box;
- }
- .findColor_main_title {
- width: 100%;
- .RecommendColor_title {
- display: flex;
- justify-content: space-between;
- font-size: 28px;
- margin-bottom: 20px;
- padding: 10px 20px;
- box-sizing: border-box;
- color: #707070;
- font-weight: bold;
- border-bottom: 1px dashed #e4e4e4;
- width: 100%;
- text {
- &:nth-child(2) {
- color: #007aff;
- }
- }
- }
- }
- .noList {
- flex: 1;
- width: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #707070;
- font-size: 26px;
- }
- .list {
- display: flex;
- padding: 20px;
- box-sizing: border-box;
- border: 1px solid #ccc;
- width: 100%;
- justify-content: space-between;
- border-radius: 10px;
- font-size: 25px;
- margin-top: 20px;
- }
- .measure {
- width: 100%;
- .list {
- justify-content: center;
- }
- .content {
- width: 100%;
- }
- .diff {
- text-align: center;
- }
- }
- .color {
- margin-top: 20px;
- }
- .labAndRgb {
- display: flex;
- width: 100%;
- justify-content: center;
- margin-top: 30px;
- .item {
- margin-top: 20px;
- font-size: 28px;
- }
- }
- .color_list {
- margin-top: 30px;
- margin-bottom: 30px;
- display: flex;
- justify-content: center;
- .color_item {
- width: 250px;
- height: 250px;
- }
- }
-}
diff --git a/src/pages/colorRelated/findColor/index.tsx b/src/pages/colorRelated/findColor/index.tsx
deleted file mode 100644
index bed71cf..0000000
--- a/src/pages/colorRelated/findColor/index.tsx
+++ /dev/null
@@ -1,142 +0,0 @@
-import { Text, View } from '@tarojs/components'
-import Taro from '@tarojs/taro'
-import type { FC } from 'react'
-import { useEffect, useMemo, useState } from 'react'
-import LineBluetooth from '../components/bluetooth/LinkBlueTooth'
-import styles from './index.module.scss'
-import HistoryColor from './components/HistoryColor'
-import LabColor from './components/LabColor'
-import RecommendColor from './components/RecommendColor'
-import SelectProduct from '@/components/selectProduct'
-import { useBluetooth } from '@/use/contextBlueTooth'
-import { FindColorListApi } from '@/api/index'
-import Loading from '@/components/loading'
-import { throttle } from '@/common/util'
-
-const FindColor: FC = () => {
- const { measureAndGetLab, disconnect, state: bluetoothState } = useBluetooth()
- const { state: colorState, fetchData: ApiFindColorList } = FindColorListApi()
-
- const [list, setList] = useState([])
- const [product, setProduct] = useState>({})
-
- // 获取数据
- const getData = async(lab) => {
- const res = await ApiFindColorList({
- product_id: product.id,
- l: lab[0],
- a: lab[1],
- b: lab[2],
- })
- if (res.success) {
- setList(res.data.list)
- }
- }
-
- const [labArray, setlabArray] = useState>([])
- const [labtime, setLabtime] = useState(+new Date())
- // 点击获取lab按钮
- const labEven = throttle(async() => {
- if (!bluetoothState.connected) {
- Taro.showToast({ title: '请先链接设备', icon: 'none' })
- return
- }
- if (!product) {
- Taro.showToast({ title: '请选择面料', icon: 'none' })
- return
- }
- await measureAndGetLab()
- }, 500)
-
- const selectInput = (val) => {
- setProduct(val)
- setLabtime('')
- setlabArray([])
- setList([])
- }
-
- const getColor = (val) => {
- console.log('val===>', val)
- setList([])
- setlabArray(val.lab)
- setLabtime(val.p_time)
- setProduct({
- code: val.code,
- default: val.default,
- id: val.id,
- name: val.name,
- })
- getData(val.lab)
- }
- const [showHistory, setShowHistory] = useState(false)
-
- const handleVisibleChange = (visible) => {
- setShowHistory(visible)
- }
-
- const ResultContainer = useMemo(() => {
- if (!colorState.loading && list?.length > 0) {
- return
- }
- else if (!colorState.loading && labArray.length == 0) {
- return -请取色-
- }
- else if (!colorState.loading && labArray.length > 0 && list?.length == 0) {
- return -暂无数据-
- }
- else if (colorState.loading) {
- return
- }
- }, [colorState, list])
-
- // 历史取样
- const historyShowEven = () => {
- setShowHistory(true)
- }
- // 本地存储取色记录(无差别存储版本)
- const localSave = (lab) => {
- const historyColorList = Taro.getStorageSync('historyColor') || []
- const obj = {
- ...product,
- p_time: +new Date(),
- lab,
- }
- historyColorList.unshift(obj)
- if (historyColorList.length > 30) { historyColorList.pop() }
- Taro.setStorageSync('historyColor', historyColorList)
- }
- useEffect(() => {
- if (!product) {
- Taro.showToast({ title: '请选择面料', icon: 'none' })
- return
- }
- if (bluetoothState.deviceLab) {
- setLabtime(+new Date())
- setlabArray([bluetoothState.deviceLab.L, bluetoothState.deviceLab.a, bluetoothState.deviceLab.b])
- // console.log('state.labArray::',state.labArray)
- localSave([bluetoothState.deviceLab.L, bluetoothState.deviceLab.a, bluetoothState.deviceLab.b])
- getData([bluetoothState.deviceLab.L, bluetoothState.deviceLab.a, bluetoothState.deviceLab.b])
- }
- }, [bluetoothState.deviceLab])
-
- return (
-
-
-
-
-
-
-
-
- 推荐数 ({list?.length})
- 历史取样
-
-
-
- {ResultContainer}
-
-
- )
-}
-
-export default FindColor
diff --git a/src/pages/colorRelated/sampleComparison/index.config.ts b/src/pages/colorRelated/sampleComparison/index.config.ts
deleted file mode 100644
index cfc4a8a..0000000
--- a/src/pages/colorRelated/sampleComparison/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '样品对比',
- enableShareAppMessage: false,
-}
diff --git a/src/pages/colorRelated/sampleComparison/index.module.scss b/src/pages/colorRelated/sampleComparison/index.module.scss
deleted file mode 100644
index 52207f9..0000000
--- a/src/pages/colorRelated/sampleComparison/index.module.scss
+++ /dev/null
@@ -1,251 +0,0 @@
-page {
- background: #f3f3f3;
- overflow: hidden;
-}
-
-.body {
- overflow: hidden;
-
- .topBox {
- margin-top: 24px;
- margin-left: 30px;
- width: 690px;
- height: 86px;
- background: #ffffff;
- border-radius: 10px;
- display: flex;
- align-items: center;
- justify-content: space-between;
-
- .leftBox {
- display: flex;
- align-items: center;
- padding-left: 19px;
-
- .leftFont {
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- text-align: left;
- color: #707070;
- margin-right: 14px;
- }
-
- .borderBox {
- width: 0px;
- height: 62px;
- border: 2px solid #f3f3f3;
- margin-right: 39px;
- }
-
- .cricleBox {
- width: 12px;
- height: 12px;
- background: #cccccc;
- border-radius: 50%;
- margin-right: 12px;
- }
-
- .notNet {
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #aaaaaa;
- }
- }
-
- .iconMore {
- margin-right: 30px;
- font-size: 30px;
- }
- }
-
- .contBox {
- margin-top: 53px;
- display: flex;
- padding-left: 56px;
-
- .firstBox {
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
-
- .firstLeftName {
- font-size: 26px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #707070;
- }
-
- .firstLeftbox {
- width: 290px;
- height: 290px;
- background: #dddddd;
- margin-top: 13px;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- border-radius: 50%;
-
- .clickFont {
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #707070;
- }
- }
-
- .color_bock {
- width: 290px;
- height: 290px;
- border-radius: 50%;
- }
-
- .color_bocktwo {
- width: 290px;
- height: 290px;
- border-radius: 50%;
- }
-
- .nameColor {
- font-size: 24px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #707070;
- margin-top: 30px;
- }
- }
- }
-
- .reslutBox {
- width: 692px;
- height: 180px;
- background: #ffffff;
- margin-top: 30px;
- margin-left: 29px;
- border-radius: 20px;
- overflow: hidden;
- }
-
- .reslutTitle {
- overflow: hidden;
- width: 100%;
- margin-top: 41px;
- display: flex;
- align-items: center;
- justify-content: space-between;
-
- .titleLeft {
- margin-left: 48px;
- font-size: 26px;
- font-family: Microsoft YaHei, Microsoft YaHei-Bold;
- font-weight: 700;
- color: #707070;
- }
-
- .titleRiht {
- margin-right: 37px;
- width: 136px;
- height: 46px;
- background: #ffd9d9;
- border-radius: 10px;
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- text-align: center;
- color: #ff4a4a;
- line-height: 46px;
- }
-
- .titleRiht1 {
- background: #cdf3df;
- margin-right: 37px;
- width: 136px;
- height: 46px;
- border-radius: 10px;
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- text-align: center;
- line-height: 46px;
- color: #07c160;
- }
- }
-
- .notResult {
- width: 100%;
- text-align: center;
- font-size: 26px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #ababab;
- margin-top: 14px;
- }
-
- .notBox {
- margin-top: 32px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- overflow: hidden;
-
- .notLeft {
- font-size: 26px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #707070;
- margin-left: 40px;
- }
-
- .notright {
- font-size: 26px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #707070;
- margin-right: 37px;
- }
- }
-
- .bottomBox {
- position: fixed;
- bottom: 0;
- width: 750px;
- height: 182px;
- background: #f3f3f3;
- box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.16);
- overflow: hidden;
- display: flex;
-
- .leftBtn {
- width: 264px;
- height: 82px;
- background: #ffffff;
- border-radius: 42px;
- font-size: 32px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- text-align: center;
- color: #007aff;
- line-height: 82px;
- margin-top: 34px;
- margin-left: 67px;
- }
-
- .rightBtn {
- width: 264px;
- height: 82px;
- background: #007aff;
- border-radius: 42px;
- font-size: 32px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- text-align: center;
- color: #ffffff;
- line-height: 82px;
- margin-top: 34px;
- margin-left: 88px;
- }
- }
-}
diff --git a/src/pages/colorRelated/sampleComparison/index.tsx b/src/pages/colorRelated/sampleComparison/index.tsx
deleted file mode 100644
index a39d7c9..0000000
--- a/src/pages/colorRelated/sampleComparison/index.tsx
+++ /dev/null
@@ -1,190 +0,0 @@
-import { Image, Text, Textarea, View } from '@tarojs/components'
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import { isObject } from '@tarojs/shared'
-import LinkBlueTooth from '../components/bluetooth/LinkBlueTooth'
-import styles from './index.module.scss'
-import { useBluetooth } from '@/use/contextBlueTooth'
-import { toRgb } from '@/common/bluetooth/color/colorSpace'
-import { ProductAbsorbContrast } from '@/api/index'
-import { alert } from '@/common/common'
-
-const SampleComparison = () => {
- // 搜索参数
- const [searchField, setSearchField] = useState({
- l1: '',
- a1: '',
- b1: '',
- l2: '',
- a2: '',
- b2: '',
- })
- interface ColorList {
- one?: Record | null
- two?: Record | null
- }
- const [colorList, setColorList] = useState({
- one: null,
- two: null,
- })
- const { state: colorState, measureAndGetLab } = useBluetooth()
-
- const getLab = async(val) => {
- if (colorState.connected) {
- const res = await measureAndGetLab()
- if (val === 1) {
- setColorList({ ...colorList, one: res })
- }
- else {
- setColorList({ ...colorList, two: res })
- }
- }
- else {
- Taro.showToast({
- title: '请链接设备',
- icon: 'none',
- })
- }
- }
- const getNowTime = () => {
- const yy = new Date().getFullYear()
- const MM = new Date().getMonth() + 1 < 10 ? `0${new Date().getMonth() + 1}` : new Date().getMonth() + 1
- const dd = new Date().getDate() < 10 ? `0${new Date().getDate()}` : new Date().getDate()
- const HH = new Date().getHours() < 10 ? `0${new Date().getHours()}` : new Date().getHours()
- const mm = new Date().getMinutes() < 10 ? `0${new Date().getMinutes()}` : new Date().getMinutes()
- const ss = new Date().getSeconds() < 10 ? `0${new Date().getSeconds()}` : new Date().getSeconds()
- return `${yy}-${MM}-${dd} ${HH}:${mm}:${ss}`
- }
- // 监听lab数据变化
- const [blueToothColor, setBlueToothColor] = useState('')
- const [blueToothColorTwo, setBlueToothColorTwo] = useState('')
- const [time, setTime] = useState('')
- const [timeTwo, setTimeTwo] = useState('')
- useEffect(() => {
- if (colorState.deviceLab) {
- const one = colorList.one
- const two = colorList.two
- if (isObject(one)) {
- const rgb = toRgb([one?.L, one?.a, one?.b])
- setBlueToothColor(`rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`)
- setTime(getNowTime())
- setSearchField({ ...searchField, l1: rgb[0], a1: rgb[1], b1: rgb[2] })
- }
- if (isObject(two)) {
- const rgb = toRgb([two?.L, two?.a, two?.b])
- setBlueToothColorTwo(`rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`)
- setTimeTwo(getNowTime())
- setSearchField({ ...searchField, l2: rgb[0], a2: rgb[1], b2: rgb[2] })
- }
- }
- }, [colorList])
-
- const [data, setData] = useState('')
- const [result, setResult] = useState('')
- const { fetchData } = ProductAbsorbContrast()
- const handTake = async() => {
- if (searchField.l1 === '') {
- Taro.showToast({
- title: '请填充基础样品',
- icon: 'none',
- })
- return
- }
- if (searchField.l2 === '') {
- Taro.showToast({
- title: '请填充对比样品',
- icon: 'none',
- })
- return
- }
- alert.showLoading('分析中')
- const query = {
- ...searchField,
- }
- const res = await fetchData(query)
- if (res.success) {
- setData(res.data)
- const diffarray = [
- res.data.reddish && '偏红',
- res.data.yellowish && '偏黄',
- res.data.greenish && '偏绿',
- res.data.bluish && '偏蓝',
- res.data.whitish && '偏亮',
- res.data.darker && '偏暗',
- ]
- const resCont = diffarray.filter(item => item).join(',')
- setResult(resCont)
- }
- alert.hideLoading()
- }
- const reset = () => {
- setColorList({})
- setBlueToothColor('')
- setBlueToothColorTwo('')
- setTime('')
- setTimeTwo('')
- setData('')
- setResult('')
- }
- return (
-
-
-
-
-
-
- 基础样品
- {blueToothColor === '' && (
- getLab(1)}>
- 点击取色
-
- )}
- {blueToothColor && getLab(1)} style={{ background: blueToothColor }}>}
- {time === '' && --}
- {time && {time}}
-
-
- 对比样品
- {blueToothColorTwo === '' && (
- getLab(2)}>
- 点击取色
-
- )}
- {blueToothColorTwo && getLab(2)} style={{ background: blueToothColorTwo }}>}
- {timeTwo === '' && --}
- {timeTwo && {timeTwo}}
-
-
-
-
- 测量结果
- {(data as any).ciede_2000 >= 1 && 不合格}
- {(data as any).ciede_2000 <= 1 && 合格}
-
- {data === '' && 暂无数据}
- {data && (
-
- 色差值: {(data as any).ciede_2000}
- {!(data as any).reddish
- && !(data as any).yellowish
- && !(data as any).greenish
- && !(data as any).bluish
- && !(data as any).whitish
- && !(data as any).darker && 无明显色差}
- {result && {result}}
-
- )}
-
-
- reset()}>
- 重置
-
- handTake()}>
- 提交
-
-
-
- )
-}
-export default SampleComparison
diff --git a/src/pages/colorRelated/takeColor/components/ColorCard/index.module.scss b/src/pages/colorRelated/takeColor/components/ColorCard/index.module.scss
deleted file mode 100644
index df46437..0000000
--- a/src/pages/colorRelated/takeColor/components/ColorCard/index.module.scss
+++ /dev/null
@@ -1,184 +0,0 @@
-
-@mixin flex-center {
- display: flex;
- justify-content: center;
- align-items: center;
-}
-@mixin flex-vertical-center {
- display: flex;
- align-items: center;
-}
-@mixin ellipsis {
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- display: inline-block;
-}
-.color-list {
- @include flex-vertical-center;
- justify-content: space-between;
- width: 690px;
- background: #ffffff;
- opacity: 1;
- padding: 30px;
- box-sizing: border-box;
- margin: 20px auto 0;
- border-radius: 35px;
- z-index: 0;
- position: relative;
- border: 4px solid transparent;
-}
-.vertical {
- position: absolute;
- width: 0;
- height: 105%;
- z-index: -1;
- overflow: hidden;
- top: 50%;
- left: 50%;
- border-radius: 35px;
- transform: translate(-50%, -50%);
-}
-.vertical view {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: 690px;
- height: 95%;
- border-radius: 35px;
- border: 4px solid #007aff;
- // border-bottom: 3px solid #007AFF;
-}
-.move-vertical {
- width: 700px;
- animation: moveVertical 0.3s ease;
-}
-@keyframes moveVertical {
- from {
- width: 0;
- }
- to {
- width: 700px;
- }
-}
-.horizontal {
- position: absolute;
- width: 100%;
- height: 100%;
- z-index: -1;
- overflow: hidden;
- top: 50%;
- left: 50%;
- border-radius: 35px;
- transform: translate(-50%, -50%);
-}
-.move-horizontal {
- height: 0;
- animation: moveHorizontal 0.3s ease 0.3s;
-}
-@keyframes moveHorizontal {
- from {
- height: 100%;
- }
- to {
- height: 0;
- }
-}
-.flash {
- animation-name: KFlash;
- animation-duration: 0.5s;
- animation-timing-function: linear;
- animation-direction: alternate;
- animation-iteration-count: infinite;
-}
-@keyframes KFlash {
- to {
- border: 4px solid #999;
- }
-}
-.c-image {
- width: 161px;
- height: 161px;
- background: rgba(0, 0, 0, 0);
- overflow: hidden;
- border-radius: 50%;
- position: relative;
-}
-.c-image text {
- font-size: 25px;
- color: white;
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
-}
-.c-image image {
- width: 100%;
- height: 100%;
-}
-.c-info {
- width: 296px;
- margin-left: 25px;
- margin-right: 25px;
- overflow: hidden;
- line-height: 34px;
-}
-.c-info text {
- @include ellipsis;
- width: 100%;
- font-size: 26px;
- font-weight: 400;
- line-height: 34px;
- color: #707070;
-}
-.c-i-title {
- @include ellipsis;
- width: 100%;
- font-size: 28px;
- font-weight: bold;
- line-height: 38px;
- color: #707070;
- margin: 5px 0;
-}
-.c-i-date {
- @include flex-center;
- width: 268px;
- height: 38px;
- background: rgba(0, 0, 0, 0.3);
- border-radius: 6px;
- font-size: 24px;
- font-weight: 400;
- color: #ffffff;
- margin-top: 17px;
-}
-.c-lab {
- height: 100%;
- justify-self: flex-end;
- @include flex-vertical-center;
- flex-direction: column;
-}
-.c-lab .c-lab-button {
- @include flex-center;
- height: 48px;
- min-width: 96px;
- background: #007aff;
- border-radius: 50px;
- font-size: 24px;
- font-weight: 400;
- line-height: 32px;
- color: #ffffff;
- margin-bottom: 12px;
- padding: 0 15px;
-}
-.c-lab .c-lab-button.again {
- background: #f0f0f0;
- color: #007aff;
-}
-.c-lab .c-lab-text {
- font-size: 24px;
- font-weight: 400;
- line-height: 36px;
- color: #707070;
- margin-top: 25px;
-}
diff --git a/src/pages/colorRelated/takeColor/components/ColorCard/index.tsx b/src/pages/colorRelated/takeColor/components/ColorCard/index.tsx
deleted file mode 100644
index 2b98845..0000000
--- a/src/pages/colorRelated/takeColor/components/ColorCard/index.tsx
+++ /dev/null
@@ -1,125 +0,0 @@
-import { Text, View } from '@tarojs/components'
-import type { FC } from 'react'
-import React, { memo, useEffect, useRef, useState, useTransition } from 'react'
-import classnames from 'classnames'
-import dayjs from 'dayjs'
-import styles from './index.module.scss'
-import { formatHashTag } from '@/common/format'
-import { alert } from '@/common/common'
-import type { BluetoothStateType } from '@/use/contextBlueTooth'
-import { toRgb } from '@/common/bluetooth/color/colorSpace'
-
-interface PropsType {
- currentTakeColorIndex?: number | null
- item?: Record
- index?: number
- onPreviewRgb?: Function
- onTakeColor?: Function
- measureAndGetLab: Function
- bluetoothState: BluetoothStateType
-}
-
-const ColorCard: FC = (params) => {
- const { item = {}, index, onTakeColor, onPreviewRgb, currentTakeColorIndex, measureAndGetLab, bluetoothState } = params
- console.log('item===>', item)
- const truncation = (ev) => {
- if (ev) {
- ev += ''
- const index = ev.lastIndexOf('.')
- let suffix = ev.substr(index + 1)
- if (suffix.length > 2) {
- suffix = suffix.substr(0, 1)
- ev = `${ev.substr(0, index)}.${suffix}`
- }
- return ev
- }
- else {
- return 0
- }
- }
- const [moveBorder, setMoveBorder] = useState(0)
- const [color, setColor] = useState({
- currnetRgb: item.rgb,
- currentLab: item.lab,
- })
-
- useEffect(() => {
- console.log('lastTakeColorIndex,index', currentTakeColorIndex, index)
- if (currentTakeColorIndex != null && currentTakeColorIndex !== index) {
- setMoveBorder(0)
- }
- }, [currentTakeColorIndex, index])
-
- const handleTakeColor = async() => {
- if (bluetoothState.connected) {
- onTakeColor?.(index)
-
- setMoveBorder(1)
- console.log('moveBorder==> start measure', moveBorder)
- const lab = await measureAndGetLab()
- // 转rgb
- const rgb = toRgb([lab.L, lab.a, lab.b])
- setColor({
- currnetRgb: {
- r: rgb[0],
- g: rgb[1],
- b: rgb[2],
- },
- currentLab: {
- l: lab.L,
- a: lab.a,
- b: lab.b,
- },
- })
- setMoveBorder(2)
- console.log('moveBorder==> end measure', moveBorder)
- }
- else {
- alert.none('请连接蓝牙')
- }
- }
-
- const handlePreviewRgb = () => {
- onPreviewRgb && onPreviewRgb()
- }
-
- return (
-
-
-
-
-
-
- {color.currentLab?.l == 0 && color.currentLab?.a == 0 && color.currentLab?.b == 0 && 末取样}
-
-
- {formatHashTag(item.product_code, item.product_name)}
-
- {formatHashTag(item.product_color_code, item.product_color_name)}({moveBorder})
-
- {item.absorb_lab_time && dayjs(item.absorb_lab_time).format('YYYY-MM-DD HH:mm:ss')}
-
-
-
- {item.sampling ? '重新取样' : '取样'}
-
-
- L*: {truncation(color?.currentLab?.l)}
- a*: {truncation(color?.currentLab?.a)}
- b*: {truncation(color?.currentLab?.b)}
-
-
-
- )
-}
-export default ColorCard
diff --git a/src/pages/colorRelated/takeColor/components/Texture/index.module.scss b/src/pages/colorRelated/takeColor/components/Texture/index.module.scss
deleted file mode 100644
index 1052c3c..0000000
--- a/src/pages/colorRelated/takeColor/components/Texture/index.module.scss
+++ /dev/null
@@ -1,68 +0,0 @@
-
- @mixin flex-center{
- display: flex;
- justify-content: center;
- align-items: center;
- }
- @mixin flex-vertical-center{
- display: flex;
- align-items: center;
- }
- .tc-info{
- @include flex-vertical-center;
- justify-content: space-between;
- margin: 15px 30px;
- }
- .tc-i-upload{
- width: 264px;
- height: 264px;
- background: #DDDDDD;
- border-radius: 264px;
- position: relative;
- z-index: 1;
- overflow: hidden;
- }
- .tc-i-upload image{
- width: 100%;
- height: 100%;
- }
- .tc-i-u-box{
- @include flex-center;
- flex-direction: column;
- position: absolute;
- z-index: -1;
- width: 100%;
- height: 100%;
- color: #707070;
- font-size: 26px;
- }
- .tc-i-u-box text{
- margin-bottom: 15px;
- font-size: 50px;
- }
- .tc-i-num{
- @include flex-vertical-center;
- font-size: 44px;
- font-weight: 400;
- line-height: 58px;
- }
- .tc-i-num>view{
- padding: 0 48px;
- position: relative;
- text-align: center;
- }
- .tc-i-num>view:first-child::after{
- content: " ";
- width: 0px;
- height: 64px;
- border: 2px solid #DDDDDD;
- position: absolute;
- right: 0;top: 50%;
- transform: translateY(-50%);
- }
- .tc-i-num text{
- font-size: 26px;
- font-weight: 400;
- line-height: 34px;
- color: #707070;
- }
diff --git a/src/pages/colorRelated/takeColor/components/Texture/index.tsx b/src/pages/colorRelated/takeColor/components/Texture/index.tsx
deleted file mode 100644
index 7cfd510..0000000
--- a/src/pages/colorRelated/takeColor/components/Texture/index.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-import { Image, Text, View } from '@tarojs/components'
-import classnames from 'classnames'
-import type { FC } from 'react'
-import { memo, useMemo, useRef, useState } from 'react'
-import Upload from '../Upload'
-import styles from './index.module.scss'
-import { screenshot } from '@/common/util'
-import { formatImgUrl, formatUrl } from '@/common/format'
-import IconFont from '@/components/iconfont/iconfont'
-
-interface TextureEvent {
- onUploadConfirm?: (file: string) => void
-}
-interface PropsType extends TextureEvent {
- list: any[]
- detail: any
- uploadConfirmState: boolean
-}
-
-const Texture: FC = (params) => {
- const { onUploadConfirm, list, detail, uploadConfirmState } = params
- console.log('detail==>', detail)
-
- const handleUploadConfirm = (url) => {
- onUploadConfirm && onUploadConfirm(url)
- }
-
- const uploadEl = useRef(null)
-
- const handleOpenModal = () => {
- uploadEl.current.handleTriggerUploadModal(true)
- }
-
- const calcNoSampling = useMemo(() => {
- const len = list?.filter((item) => {
- return item.currentLab?.l == 0 && item.currentLab?.a == 0 && item.currentLab?.b == 0
- })
- return len?.length ?? 0
- }, [list])
-
- return (
-
-
-
- {detail.texture_url && }
-
-
- 上传纹理
-
-
-
-
- {(list?.length ?? 0) - calcNoSampling}
- 已取样
-
-
- {calcNoSampling}
- 未取样
-
-
-
-
-
- )
-}
-export default Texture
diff --git a/src/pages/colorRelated/takeColor/components/Upload/index.module.scss b/src/pages/colorRelated/takeColor/components/Upload/index.module.scss
deleted file mode 100644
index 67f90fc..0000000
--- a/src/pages/colorRelated/takeColor/components/Upload/index.module.scss
+++ /dev/null
@@ -1,68 +0,0 @@
-
- @mixin flex-center{
- display: flex;
- justify-content: center;
- align-items: center;
- }
- @mixin flex-vertical-center{
- display: flex;
- align-items: center;
- }
- .upload-container .drawer{
- position: fixed;
- top: 0;
- z-index: 10;
- }
- .u-content{
- @include flex-center;
- flex-direction: column;
- width: 100%;
- padding: 65px 0;
- }
- .u-image{
- width: 422px;
- height: 422px;
- background: #F0F0F0;
- border-radius: 50%;
- overflow: hidden;
- position: relative;
- z-index: 0;
- }
- .u-image view{
- width: 100%;
- height: 100%;
- @include flex-center;
- font-size: 28px;
- font-weight: 400;
- color: #707070;
- position: absolute;
- top: 0;left: 0;
- z-index: 1;
- }
- .u-image .update-statu{
- color: white;
- background-color: rgba(0, 0, 0, 0.5);
- }
- .u-image image{
- width: 100%;
- height: 100%;
- }
- .u-button{
- display: flex;
- margin-top: 76px;
- }
- .u-button view{
- width: 264px;
- height: 82px;
- background: #F0F0F0;
- border-radius: 82px;
- @include flex-center;
- font-size: 32px;
- font-weight: 400;
- color: #007AFF;
- margin: 0 15px;
- }
- .u-button .confirm{
- background: #007AFF;
- color: white;
- }
diff --git a/src/pages/colorRelated/takeColor/components/Upload/index.tsx b/src/pages/colorRelated/takeColor/components/Upload/index.tsx
deleted file mode 100644
index 8831ce3..0000000
--- a/src/pages/colorRelated/takeColor/components/Upload/index.tsx
+++ /dev/null
@@ -1,77 +0,0 @@
-import { Image, RootPortal, Text, View } from '@tarojs/components'
-import Taro from '@tarojs/taro'
-import { FC, forwardRef, useEffect, useImperativeHandle, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-import Popup from '@/components/popup'
-
-interface UploadColorEvent {
- onUploadConfirm?: Function
-}
-
-interface PropsType extends UploadColorEvent {
- uploadConfirmState: boolean
-}
-
-const UploadColor = (params: PropsType, ref) => {
- const { onUploadConfirm, uploadConfirmState } = params
- const [showModal, setShowModal] = useState(false)
- const [filePath, setFilePath] = useState('')
- const [file, setFile] = useState({})
-
- const handleUpload = async() => {
- Taro.chooseMedia({
- count: 1,
- mediaType: ['image'],
- sourceType: ['album'],
- success(ev) {
- setFilePath(ev.tempFiles[0].tempFilePath)
- setFile(ev.tempFiles[0])
- },
- })
- }
-
- const handleTriggerUploadModal = (bool: boolean) => {
- setShowModal(bool)
- }
- useImperativeHandle(
- ref,
- () => ({
- handleTriggerUploadModal,
- }),
- [handleTriggerUploadModal],
- )
-
- const handleClear = () => {
- setFilePath('')
- }
- const handleUploadConfirm = () => {
- onUploadConfirm && onUploadConfirm(file)
- }
- useEffect(() => {
- if (uploadConfirmState) {
- setFilePath('')
- handleTriggerUploadModal(false)
- }
- }, [uploadConfirmState])
- return (
-
- handleTriggerUploadModal(false)}>
-
-
- {filePath && }
-
- {filePath ? '点击修改' : '点击上传'}
-
-
- 清除
-
- 确定
-
-
-
-
-
- )
-}
-export default forwardRef(UploadColor)
diff --git a/src/pages/colorRelated/takeColor/index.config.ts b/src/pages/colorRelated/takeColor/index.config.ts
deleted file mode 100644
index 6168a81..0000000
--- a/src/pages/colorRelated/takeColor/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '颜色取样',
- enableShareAppMessage: false,
-}
diff --git a/src/pages/colorRelated/takeColor/index.module.scss b/src/pages/colorRelated/takeColor/index.module.scss
deleted file mode 100644
index d843e6c..0000000
--- a/src/pages/colorRelated/takeColor/index.module.scss
+++ /dev/null
@@ -1,143 +0,0 @@
-@mixin flex-center {
- display: flex;
- justify-content: center;
- align-items: center;
-}
-@mixin flex-vertical-center {
- display: flex;
- align-items: center;
-}
-page {
- background: #f3f3f3;
-}
-.card {
- background: #fff;
- padding: 0 20px;
- border-radius: 20px;
- box-sizing: border-box;
- margin: 26px 30px;
-}
-.list-box {
- padding-bottom: 220px;
-}
-.lb-title {
- position: sticky;
- top: 0;
- z-index: 1;
- font-size: 28px;
- font-weight: 400;
- background-color: #f3f3f3;
- color: #707070;
- border-top: 1px dashed #e4e4e4;
- padding: 26px 46px;
- box-sizing: border-box;
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-.lb-t-serach {
- flex: 0 1 60%;
- @include flex-vertical-center;
- .lb-t-search-content {
- position: relative;
- width: 100%;
- display: flex;
- .input-bar {
- width: 100%;
- box-sizing: border-box;
- padding-left: 36px;
- border-radius: 100px;
- padding-right: 100px;
- }
- .lb-t-sc-clear {
- position: absolute;
- right: 36px;
- top: 50%;
- transform: translateY(-50%);
- display: flex;
- justify-content: center;
- align-items: center;
- @include flex-vertical-center;
- height: 66px;
- width: 66px;
- border-radius: 50%;
- background-color: #e7e7e7;
- font-size: 28px;
- }
- }
-}
-.lb-t-serach .lb-t-search-content > text {
- padding: 10px 0;
- color: #707070;
- font-size: 24px;
-}
-.lb-title input {
- height: 66px;
- background-color: #e7e7e7;
- font-size: 26px;
-}
-.lb-t-search-content text {
- color: #fff;
- font-size: 30px;
-}
-
-.not-list {
- font-size: 28px;
- font-weight: 400;
- line-height: 38px;
- color: #707070;
- margin-top: 180px;
- text-align: center;
-}
-
-.lab-view {
- position: fixed;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- z-index: 100;
- background-color: rgba(0, 0, 0, 1);
-}
-.lab-view view {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: 100%;
- height: 0;
- padding-bottom: 100%;
-}
-
-.fixedBottom-container {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- display: flex;
- justify-content: space-between;
- width: 750px;
- height: 182px;
- background: #f3f3f3;
- box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.16);
- padding: 35px 68px;
- box-sizing: border-box;
-}
-.fixedBottom-container view {
- width: 264px;
- height: 82px;
- background: #ffffff;
- opacity: 1;
- border-radius: 50px;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 32px;
- font-weight: 400;
- line-height: 42px;
- color: #007aff;
-}
-.fixedBottom-container .fb-confirm {
- background-color: #007aff;
- color: white;
-}
diff --git a/src/pages/colorRelated/takeColor/index.tsx b/src/pages/colorRelated/takeColor/index.tsx
deleted file mode 100644
index 19b7d07..0000000
--- a/src/pages/colorRelated/takeColor/index.tsx
+++ /dev/null
@@ -1,251 +0,0 @@
-import { Input, Text, View } from '@tarojs/components'
-import type { FC } from 'react'
-import { useCallback, useMemo, useRef, useState } from 'react'
-import LinkBlueTooth from '../components/bluetooth/LinkBlueTooth'
-import styles from './index.module.scss'
-import ColorCard from './components/ColorCard'
-import Texture from './components/Texture'
-import SelectProduct from '@/components/selectProduct/index'
-import IconFont from '@/components/iconfont/iconfont'
-import { ColorDetailedApi, ColorListApi, ColorSamplingSaveApi, TextureSaveApi } from '@/api/index'
-import { breakupUrl, formatHashTag, formatImgUrl, formatUrl } from '@/common/format'
-import { alert } from '@/common/common'
-import useUploadCDNImg from '@/use/useUploadImage'
-import { useBluetooth } from '@/use/contextBlueTooth'
-import { toRgb } from '@/common/bluetooth/color/colorSpace'
-// 颜色取样
-const TakeColor: FC = () => {
- const { state, fetchData } = ColorListApi()
- const { uploadCDNImg } = useUploadCDNImg()
- const { state: detail, fetchData: detailFetchData } = ColorDetailedApi()
- const { state: textureSaveData, fetchData: textureSaveFetchData } = TextureSaveApi()
- const { state: saveData, fetchData: saveFetchData } = ColorSamplingSaveApi()
- const { measureAndGetLab, state: bluetoothState } = useBluetooth()
- const [searchValue, setSearchValue] = useState('')
- const [selectedProduct, setSelectedProduct] = useState>({})
- const [listData, setListData] = useState[]>([])
-
- const selectInput = async(event) => {
- if (event) {
- alert.showLoading('正在加载颜色')
- setSelectedProduct(event)
- const res = await fetchData({ id: event.id })
- if (res.success) {
- res.data?.list.forEach((item, index) => {
- item.currnetRgb = item.rgb
- item.currentLab = item.lab
- item.sampling = !(item.currentLab?.l == 0 && item.currentLab?.a == 0 && item.currentLab?.b == 0)
- item.moveBorder = 0
- item.key = index
- })
- setListData(res.data?.list)
- await detailFetchData({ id: event.id })
- }
- alert.hideLoading()
- }
- else {
- setListData([])
- alert.hideLoading()
- }
- }
-
- const clearSearchValue = () => {
- console.log('asdfasdf')
- setSearchValue('')
- }
-
- const [currentTakeColorIndex, setCurrentTakeColorIndex] = useState(null)
-
- const handleTakeColor = (index: number) => {
- setCurrentTakeColorIndex(index)
- }
-
- // const listData = useMemo(() => {
- // return state.data?.list?.filter(item => {
- // if (searchValue) {
- // return formatHashTag(item.product_color_name, item.product_color_code)!.includes(searchValue)
- // }
- // return true
- // })
- // }, [state.data?.list, state])
- const productSelectEl = useRef(null)
-
- const onSearchInput = (event) => {
- const current = event.detail.value
- if (current === '') {
- setListData(state.data.list)
- }
- else {
- setListData(
- state.data?.list?.filter((item) => {
- return formatHashTag(item.product_color_name, item.product_color_code)!.includes(current)
- }),
- )
- }
- }
- // 底部提交
- const handleSubmit = async() => {
- if (selectedProduct.id) {
- const params = {
- id: selectedProduct.id,
- product_color_absorb: state.data.list.map((item) => {
- return {
- product_color_id: item.product_color_id,
- l: item.currentLab.l,
- a: item.currentLab.a,
- b: item.currentLab.b,
- // absorb_lab_time: `${dayjs(new Date())
- // .add(0, "day")
- // .format("YYYY-MM-DD")} 00:00:00`
- absorb_lab_time: new Date(),
- }
- }),
- }
- alert.showLoading('保存中')
- const res = await saveFetchData(params)
- if (res.success) {
- alert.success('保存成功')
- }
- else {
- alert.error('保存失败')
- }
- }
- else {
- productSelectEl.current.clickEvent()
- alert.none('请选择面料')
- }
- }
- // 重置
- const handleReset = () => {
- console.log('handleReset')
- if (selectedProduct.id) {
- setListData(
- state.data.list.map((item) => {
- item.moveBorder = 0
- item.currnetRgb = item.rgb
- item.currentLab = item.lab
- item.sampling = !(item.currentLab?.l == 0 && item.currentLab?.a == 0 && item.currentLab?.b == 0)
- return item
- }),
- )
- }
- else {
- productSelectEl.current.clickEvent()
- alert.none('请选择面料')
- }
- }
-
- const [labPreview, setLabPreview] = useState({
- currnetRgb: {
- r: 0,
- g: 0,
- b: 0,
- },
- })
-
- const [showLabPreview, setShowLabPreview] = useState(false)
-
- const [uploadConfirmState, setUploadConfirmState] = useState(false)
-
- const handleUploadConfirm = async(file) => {
- setUploadConfirmState(false)
- if (file) {
- if (selectedProduct.id) {
- alert.showLoading('上传中')
- const res = await uploadCDNImg({ path: file.tempFilePath }, 'product', 'product')
- if (res && res?.code == 200) {
- // console.log('图片地址真实',`${IMG_CND_Prefix}${res.url}`);
-
- // TODO: 回填到存储的地方
- await textureSaveFetchData({
- id: selectedProduct.id,
- texture_url: breakupUrl(res.url),
- upload_texture_time: new Date(),
- })
- await detailFetchData({ id: selectedProduct.id })
- alert.none('上传成功')
- setUploadConfirmState(true)
- }
- else {
- res && alert.none(`${res.message}`)
- }
- }
- else {
- productSelectEl.current.clickEvent()
- alert.none('请选择面料')
- }
- }
- else {
- alert.none('请选择图片')
- }
- }
- const handlePrViewRgb = useCallback((event) => {
- setLabPreview(event)
- setShowLabPreview(true)
- }, [])
- return (
- <>
-
-
-
-
-
-
-
- 颜色列表({listData?.length ?? 0})
-
-
-
-
- {searchValue.length > 0 && }
-
-
-
-
- {listData.length
- ? (
- listData.map((item, index) => {
- return (
-
- )
- })
- )
- : (
- -请取色-
- )}
-
-
-
- 重置
-
-
- 提交
-
-
- {showLabPreview && (
- setShowLabPreview(false)} className={styles['lab-view']}>
-
-
- )}
- >
- )
-}
-
-export default TakeColor
diff --git a/src/pages/customerDetails/components/form/index.module.scss b/src/pages/customerDetails/components/form/index.module.scss
deleted file mode 100644
index 091a63d..0000000
--- a/src/pages/customerDetails/components/form/index.module.scss
+++ /dev/null
@@ -1,80 +0,0 @@
-.mainItem {
- display: flex;
- align-items: center;
- border-bottom: 1px solid #e5e5e5;
- padding-bottom: 40px;
- margin-bottom: 40px;
-
- .mainItem_left {
- width: 176px;
- font-size: 28px;
- font-weight: 500;
- color: #000000;
- }
-
- .mainItem_right {
- font-size: 28px;
- font-weight: 400;
- color: #6c6c6c;
- margin-right: 16px;
- }
-
- .mainItem_active_right {
- font-size: 28px;
- font-weight: 400;
- color: #337FFF;
- margin-right: 16px;
- }
-
- .call {
- width: 65px;
- height: 34px;
- border-radius: 8px;
- border: 1px solid #337FFF;
- font-size: 24px;
- font-weight: 400;
- color: #337FFF;
- line-height: 34px;
- text-align: center;
- }
-}
-
-.mainItem_active {
- display: flex;
- align-items: center;
- border-bottom: none;
- margin-bottom: 40px;
-
- .mainItem_left {
- width: 176px;
- font-size: 28px;
- font-weight: 500;
- color: #000000;
- }
-
- .mainItem_right {
- font-size: 28px;
- font-weight: 400;
- color: #6c6c6c;
- margin-right: 16px;
- }
-
- .mainItem_active_right {
- font-size: 28px;
- font-weight: 400;
- color: #337FFF;
- margin-right: 16px;
- }
-
- .call {
- width: 65px;
- height: 34px;
- border-radius: 8px;
- border: 1px solid #337FFF;
- font-size: 24px;
- font-weight: 400;
- color: #337FFF;
- line-height: 34px;
- text-align: center;
- }
-}
\ No newline at end of file
diff --git a/src/pages/customerDetails/components/form/index.tsx b/src/pages/customerDetails/components/form/index.tsx
deleted file mode 100644
index 92223d0..0000000
--- a/src/pages/customerDetails/components/form/index.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { View } from '@tarojs/components'
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import React, { ReactNode, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-import { alert } from '@/common/common'
-import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format'
-import IconFont from '@/components/iconfont/iconfont'
-
-interface Props {
- title: string
- des: string | number
- isPhone?: boolean
- isBorder?: boolean
-}
-const Form = (props: Props) => {
- const {
- isPhone = false,
- isBorder = true,
- } = props
-
- const handPhone = () => {
- Taro.makePhoneCall({
- phoneNumber: props.des as string,
- })
- }
-
- return (
-
- {props.title}
- {props.des}
- {
- isPhone && handPhone()}>拨打
- }
-
- )
-}
-export default memo(Form)
diff --git a/src/pages/customerDetails/components/tabs/index.module.scss b/src/pages/customerDetails/components/tabs/index.module.scss
deleted file mode 100644
index aeaad92..0000000
--- a/src/pages/customerDetails/components/tabs/index.module.scss
+++ /dev/null
@@ -1,42 +0,0 @@
-.flexBox {
- width: 100%;
- height: 102px;
- background: #ffffff;
- display: flex;
- position: sticky;
- top: 80px;
- .itemBox {
- position: relative;
- flex: 1;
- min-width: 138px;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- text-align: center;
- height: 102px;
-
- .itemFont {
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Bold;
- font-weight: 400;
- color: #000000;
- }
-
- .activeItems {
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 700;
- color: #337FFF;
- }
-
- .borderBox {
- position: absolute;
- bottom: 0;
- width: 138px;
- height: 6px;
- background: #337FFF;
- border-radius: 4px;
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/customerDetails/components/tabs/index.tsx b/src/pages/customerDetails/components/tabs/index.tsx
deleted file mode 100644
index 4bf6cf6..0000000
--- a/src/pages/customerDetails/components/tabs/index.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import { Button, Input, View } from '@tarojs/components'
-import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-
-interface Props {
- list: any[]
- handChose?: (any) => void
-}
-const Tabs = (props: Props) => {
- const { list = [], handChose } = props
-
- return (
-
- {
- list.map((item, index) => {
- return (
- handChose?.(item)}>
- {item?.name}
- {
- item.showBorder &&
- }
-
- )
- })
- }
-
- )
-}
-export default memo(Tabs)
diff --git a/src/pages/customerDetails/components/tagPopup/index.module.scss b/src/pages/customerDetails/components/tagPopup/index.module.scss
deleted file mode 100644
index 63767ca..0000000
--- a/src/pages/customerDetails/components/tagPopup/index.module.scss
+++ /dev/null
@@ -1,96 +0,0 @@
-.scrollView {
- max-height: 75vh;
- .thirdBox {
- padding-left: 48px;
-
- .thirdTopfont {
- font-size: 28px;
- font-weight: 500;
- color: #000000;
- }
-
- .flexModebox {
- margin-top: 24px;
- display: flex;
- flex-wrap: wrap;
- flex-shrink: 0;
-
- .activemodeBox {
- background: rgba(51, 127, 255, 0.1) !important;
- color: #337fff !important;
- border: 1px solid #337fff !important;
- }
-
- .modeBox {
- min-width: 200px;
- margin-bottom: 10px;
- margin-right: 16px;
- padding: 10px 20px;
- background: #f6f6f6;
- border-radius: 8px;
- font-size: 28px;
- font-weight: 400;
- color: #777777;
- border: 1px solid #f6f6f6;
- text-align: center;
- box-sizing: border-box;
- }
- }
- }
-}
-
-.bottomBox {
- width: 100%;
- // width: 750px;
- height: 160px;
- background: #ffffff;
- // position: fixed;
- // bottom: calc($customTabBarHeight + env(safe-area-inset-bottom));
- z-index: 99;
- display: flex;
- padding-top: 16px;
- align-items: center;
- justify-content: space-between;
-
- .resetBox {
- margin-left: 48px;
- width: 311px;
- height: 80px;
- border-radius: 44px;
- border: 1px solid #087eff;
- font-size: 28px;
- font-weight: 500;
- color: #337fff;
- text-align: center;
- line-height: 80px;
- background-color: #fff;
- }
-
- .button {
- margin-right: 32px;
- width: 311px;
- height: 80px;
- background: #68b4ff;
- border-radius: 44px;
- font-size: 28px;
- font-weight: 500;
- color: #ffffff;
- text-align: center;
- line-height: 80px;
- letter-spacing: 4px;
- }
-
- .activeButton {
- background: #337fff;
- border-radius: 44px;
- }
-}
-
-.goLink {
- position: absolute;
- right: 32px;
- top: 37px;
- font-size: 28px;
- font-weight: 400;
- color: #337fff;
-}
diff --git a/src/pages/customerDetails/components/tagPopup/index.tsx b/src/pages/customerDetails/components/tagPopup/index.tsx
deleted file mode 100644
index 92ebf10..0000000
--- a/src/pages/customerDetails/components/tagPopup/index.tsx
+++ /dev/null
@@ -1,132 +0,0 @@
-import { Button, ScrollView, View } from '@tarojs/components'
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import React, { ReactNode, forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-import { alert, goLink } from '@/common/common'
-import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format'
-import IconFont from '@/components/iconfont/iconfont'
-import Popup from '@/components/popup'
-import { MpPurchaserLabelAdd, MpPurchaserList } from '@/api/customer'
-import NormalButton from '@/components/normalButton'
-
-interface Props {
- showPopup: boolean
- handClose: () => void
- purchaser_id?: string | number
- diseShow?: () => void
-}
-const TagPopup = (props: Props, ref) => {
- const router = useRouter()
-
- const { fetchData } = MpPurchaserList()
- // 标签
- const [modeList, setModeList] = useState([])
- const getList = async() => {
- const res = await fetchData()
- if (res.data) {
- setModeList([...res.data.list])
- }
- }
-
- // 选择标签
- const handCheckMode = (item) => {
- modeList.map((it) => {
- if (it.id === item.id) {
- it.checked = !it.checked
- }
- return it
- })
- setModeList([...modeList])
- }
-
- const handReset = () => {
- modeList.map((it) => {
- it.checked = false
- return it
- })
- setModeList([...modeList])
- }
- const { fetchData: addFetch } = MpPurchaserLabelAdd()
- const handSure = async() => {
- const arr: any[] = []
- const fltArr = modeList.filter((item) => { return item.checked })
- fltArr.forEach((item) => {
- arr.push({
- label_id: item.id,
- })
- })
- Taro.showLoading({
- title: '请稍等...',
- mask: true,
- })
- const res = await addFetch({ binding_label: arr, purchaser_id: Number(router.params.purchaser_id) })
- if (res.msg == 'success') {
- Taro.showToast({
- icon: 'success',
- title: '成功',
- })
- Taro.hideLoading()
- }
- else {
- Taro.showToast({
- icon: 'error',
- title: res.msg,
- })
- Taro.hideLoading()
- }
- props?.diseShow?.()
- }
-
- const isDisabled = useMemo(() => {
- const arr = modeList.filter((item) => { return item.checked })
- if (arr.length) {
- return false
- }
- else {
- return true
- }
- }, [modeList])
-
- const choseNums = useMemo(() => {
- const arr = modeList.filter((item) => { return item.checked })
- return arr.length
- }, [modeList])
-
- useImperativeHandle(ref, () => ({
- modeList,
- setModeList,
- }))
- useEffect(() => {
- getList()
- }, [])
- return (
- { props.handClose() }}>
-
-
- 自定义标签分组
-
- {modeList.map((item, index) => {
- return (
- {
- handCheckMode(item)
- }}
- className={classnames(styles.modeBox, item.checked && styles.activemodeBox)}
- key={index}
- >
- {item.name}
-
- )
- })}
-
-
-
-
- 重置
- 保存({choseNums})
-
-
- )
-}
-export default memo(forwardRef(TagPopup))
diff --git a/src/pages/customerDetails/index.config.ts b/src/pages/customerDetails/index.config.ts
deleted file mode 100644
index f07472b..0000000
--- a/src/pages/customerDetails/index.config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export default {
- navigationBarTitleText: '客户详情',
-}
diff --git a/src/pages/customerDetails/index.module.scss b/src/pages/customerDetails/index.module.scss
deleted file mode 100644
index 49200f9..0000000
--- a/src/pages/customerDetails/index.module.scss
+++ /dev/null
@@ -1,125 +0,0 @@
-.mainTop {
- padding-top: 24px;
- background: #fff;
- overflow: hidden;
-
- .mainUser {
- padding-top: 36px;
- margin-left: 24px;
- margin-right: 24px;
- display: flex;
- position: relative;
- background: #f6f7fb;
- border-radius: 16px;
- padding-bottom: 20px;
-
- // margin-bottom: 16px;
- .leftSafe {
- width: 142px;
- display: flex;
- align-items: center;
- justify-content: center;
- .itemCile {
- width: 78px;
- height: 78px;
- background: linear-gradient(337deg, #7bb7ff 0%, #4581ff 100%);
- font-size: 32px;
- font-weight: 500;
- color: #ffffff;
- text-align: center;
- line-height: 78px;
- border-radius: 50%;
- margin-right: 32px;
- margin-left: 32px;
- }
- }
-
- .item_top_one {
- .item_top_one_flex {
- display: flex;
- align-items: center;
-
- .itemName {
- font-size: 28px;
- font-weight: 500;
- color: #000000;
- margin-right: 24px;
- }
-
- .itemPhone {
- font-size: 28px;
- font-weight: 400;
- color: #646466;
- }
- }
-
- .item_tag_box {
- margin-top: 16px;
- display: flex;
- align-items: center;
- flex-wrap: wrap;
-
- .item_tagItem {
- margin-bottom: 5px;
- margin-right: 16px;
- padding: 4px 10px 4px 10px;
- font-size: 24px;
- font-weight: 500;
- color: #4581ff;
- background: #e3eafb;
- border-radius: 8px;
- border: none;
- }
-
- .item_tagAdd {
- color: #4581ff;
- background: #ecf2ff;
- width: 114px;
- height: 45px;
- border-radius: 8px;
- display: flex;
- align-items: center;
-
- justify-content: space-between;
-
- .item_add {
- margin-left: 20px;
- line-height: 45px;
- // font-size: 40px;
- // margin-left: 8px;
- }
-
- .item_add_font {
- font-size: 24px;
- font-weight: 500;
- color: #4581ff;
- margin-right: 15px;
- }
- }
- }
- }
-
- .pos {
- position: absolute;
- top: 35px;
- right: 24px;
- font-size: 28px;
- font-weight: 400;
- color: #337fff;
- }
- }
-}
-
-.formBox {
- margin-top: 24px;
- margin-left: 24px;
- margin-right: 24px;
- background: #ffffff;
- border-radius: 16px;
- padding: 40px 32px 40px 32px;
-}
-
-.order_list {
- height: calc(100vh - 250px);
- margin-top: 24px;
-}
diff --git a/src/pages/customerDetails/index.tsx b/src/pages/customerDetails/index.tsx
deleted file mode 100644
index 97b605f..0000000
--- a/src/pages/customerDetails/index.tsx
+++ /dev/null
@@ -1,151 +0,0 @@
-import { View } from '@tarojs/components'
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import React, { ReactNode, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-import Tabs from './components/tabs'
-import Form from './components/form'
-import TagPopup from './components/tagPopup'
-import Popup from '@/components/popup'
-import { debounce } from '@/common/util'
-import { alert, goLink } from '@/common/common'
-import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format'
-import AddressList from '@/components/AddressList'
-import { MpPurchaser } from '@/api/customer'
-import Tag from '@/components/tag'
-
-const CustomerDetails = () => {
- const router = useRouter()
-
- const [status, setstatus] = useState(1)
-
- const [infoObj, setinfoObj] = useState()
- const { fetchData: getDesc } = MpPurchaser()
-
- // 顶部栏
- const AddressListRef = useRef()
- const [TarBarList, setTarBarList] = useState([{ id: 1, name: '基础信息', showBorder: true }, { id: 2, name: '收货地址', showBorder: false }])
- const handChose = (item) => {
- TarBarList.forEach((it) => {
- if (it.id === item.id) {
- it.showBorder = true
- }
- else {
- it.showBorder = false
- }
- setTarBarList([...TarBarList])
- setstatus(item.id)
- // pageNum.current.page = 1
- // setOrderData(() => ({ list: [], total: 0 }))
- // setSearchField((val) => ({ ...val, size: 10, status: item.id }))
- })
- if (item.id == 2) {
- Taro.nextTick(() => {
- AddressListRef.current?.getData()
- })
- }
- }
-
- const [showPopup, setshowPopup] = useState(false)
- const TagPopupRef = useRef()
- const handShow = () => {
- TagPopupRef?.current?.modeList.map((it) => {
- infoObj?.label_list?.forEach((item) => {
- if (it.id == item.label_id) {
- it.checked = true
- }
- })
- return it
- })
- TagPopupRef.current.setModeList([...TagPopupRef.current.modeList])
- setshowPopup(true)
- }
- const getInfo = async() => {
- Taro.showLoading({
- title: '请稍等...',
- mask: true,
- })
- const res = await getDesc({ id: router.params.purchaser_id })
- setinfoObj(res.data)
- Taro.hideLoading()
- setshowPopup(false)
- }
- useDidShow(() => {
- getInfo()
- })
- return (
-
-
-
-
- {infoObj?.name?.[0]}
-
-
-
- {infoObj?.name}
- {infoObj?.phone}
-
-
- {
- infoObj?.platform_source !== 1 &&
- {infoObj?.platform_source_name || '暂无'}
-
- }
-
- {infoObj?.purchaser_type_name || '暂无'}
-
-
- {infoObj?.sale_user_name || '暂无'}
-
- {/* {infoObj?.purchaser_type_name || '暂无'}
- {infoObj?.sale_user_name || '暂无'} */}
- {
- infoObj?.label_list?.map((item, key) => {
- return (
-
- {item.label_name}
-
- // {item.label_name}
- )
- })
- }
- handShow()}>
- +
- 标签
-
-
-
- goLink(`/pages/customerEditor/index?id=${router.params.purchaser_id}&type=edit`)}>{'编辑 >'}
-
- handChose?.(item)}>
-
- {
- status === 1 &&
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- {
- status === 2
- &&
-
-
- }
- setshowPopup(false)} diseShow={() => getInfo()}>
-
- )
-}
-export default CustomerDetails
diff --git a/src/pages/customerEditor/components/Form/index.module.scss b/src/pages/customerEditor/components/Form/index.module.scss
deleted file mode 100644
index 351bcac..0000000
--- a/src/pages/customerEditor/components/Form/index.module.scss
+++ /dev/null
@@ -1,83 +0,0 @@
-.mainItem {
- margin-bottom: 40px;
- display: flex;
- align-items: center;
- padding-bottom: 20px;
- border-bottom: 1px solid #e8e8e8;
-
- .leftItem {
- width: 176px;
- display: flex;
- align-items: center;
- font-size: 28px;
- font-weight: 500;
- color: #333333;
-
- .xing {
- font-size: 28px;
- font-weight: 500;
- color: #E42945;
- }
- }
-
- .rightItem {
- display: flex;
- align-items: center;
- width: 100%;
- padding-left: 48px;
-
- .placeholderStyle {
- color: #f7f7f7;
- font-size: 28px;
- font-weight: 400;
- }
-
- .inputStyle {
- width: 100%;
- font-size: 28px;
- font-weight: 400;
- color: #000000;
- }
- }
-}
-
-.mainItemactive {
- display: flex;
- align-items: center;
- border-bottom: none;
-
- .leftItem {
- width: 176px;
- display: flex;
- align-items: center;
- font-size: 28px;
- font-weight: 500;
- color: #000000;
-
- .xing {
- font-size: 28px;
- font-weight: 500;
- color: #E42945;
- }
- }
-
- .rightItem {
- display: flex;
- align-items: center;
- width: 100%;
- padding-left: 48px;
-
- .placeholderStyle {
- color: #f7f7f7;
- font-size: 28px;
- font-weight: 400;
- }
-
- .inputStyle {
- width: 100%;
- font-size: 28px;
- font-weight: 400;
- color: #000000;
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/customerEditor/components/Form/index.tsx b/src/pages/customerEditor/components/Form/index.tsx
deleted file mode 100644
index eb9fc9d..0000000
--- a/src/pages/customerEditor/components/Form/index.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-import { Button, Input, ScrollView, View } from '@tarojs/components'
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import type { ReactNode } from 'react'
-import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-import { alert, goLink } from '@/common/common'
-import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format'
-import IconFont from '@/components/iconfont/iconfont'
-import Popup from '@/components/popup'
-
-interface Props {
- title: string
- isQuire?: boolean
- placeholderFont?: string
- handBlur?: (any) => void
- inputValue?: string
- isDisabled?: boolean
- inputType?: any
- maxlength?: number
- children?: ReactNode
- showInput?: boolean
- showMore?: boolean
- showBorder?: boolean
- handNav?: () => void
-}
-const Form = (props: Props) => {
- const {
- title = '标题',
- isQuire = true,
- placeholderFont = '请输入',
- handBlur,
- handNav,
- inputValue,
- isDisabled,
- inputType = 'text',
- maxlength = 999,
- children,
- showInput = true,
- showMore = false,
- showBorder = true,
- } = props
-
- return (
-
- {title}
- {
- isQuire && *
- }
-
- {
- !children && handNav?.()}>
- {
- showInput && handBlur?.(e.detail.value)}
- value={inputValue}
- >
- }
- {
- showMore &&
- }
-
- }
- {children}
-
- )
-}
-export default memo(Form)
diff --git a/src/pages/customerEditor/index.config.ts b/src/pages/customerEditor/index.config.ts
deleted file mode 100644
index f7405a2..0000000
--- a/src/pages/customerEditor/index.config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export default {
- navigationBarTitleText: '客户编辑',
-}
diff --git a/src/pages/customerEditor/index.module.scss b/src/pages/customerEditor/index.module.scss
deleted file mode 100644
index 2f78e68..0000000
--- a/src/pages/customerEditor/index.module.scss
+++ /dev/null
@@ -1,155 +0,0 @@
-.mainBox {
- margin: 24px;
- background: #fff;
- padding: 40px 32px 40px 32px;
- border-radius: 16px;
-
- .flexBox {
- display: flex;
- align-items: center;
-
- .itemBox {
- background: #f6f6f6;
- border: 1px solid #f6f6f6;
- box-sizing: border-box;
- width: 132px;
- height: 56px;
- opacity: 0.4;
- background: #E9E9E9;
- border-radius: 8px;
- font-size: 28px;
- font-weight: 400;
- color: #000000;
- text-align: center;
- line-height: 56px;
- margin-right: 24px;
- }
-
- .activeBox {
- width: 132px;
- height: 56px;
- background: rgba(51, 127, 255, 0.1);
- border-radius: 8px;
- border: 1px solid #337FFF;
- font-size: 28px;
- font-weight: 500;
- color: #337FFF;
- box-sizing: border-box;
- text-align: center;
- line-height: 56px;
- margin-right: 24px;
- }
- }
-}
-
-.defaltBox {
- margin: 24px;
- padding: 24px 32px 24px 24px;
- background: #FFFFFF;
- border-radius: 16px;
-
- .titleBox {
- width: 638px;
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- .title {
- font-size: 28px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #000000;
- }
-
- .modeName {
- font-size: 28px;
- font-weight: 500;
- color: #337FFF;
- }
- }
-
- .modeLine {
- margin-top: 24px;
- width: 638px;
- height: 1px;
- background: #000000;
- opacity: 0.1;
- }
-
-}
-
-.remarkFont {
- margin-top: 24px;
- font-size: 28px;
- font-weight: 400;
- color: #000000;
-}
-
-.remarkFontactive {
- margin-top: 24px;
- font-size: 28px;
- font-weight: 400;
- color: #aeaeae;
-}
-
-.safeBox {
- width: 100%;
- height: 160px;
-}
-
-.bottomBox {
- width: 100%;
- // width: 750px;
- height: 160px;
- background: #FFFFFF;
- position: fixed;
- bottom: 0;
- z-index: 99;
- display: flex;
- padding-top: 16px;
- align-items: center;
- justify-content: space-between;
-
- .resetBox {
- margin-left: 48px;
- width: 311px;
- height: 80px;
- border-radius: 44px;
- border: 1px solid #087EFF;
- font-size: 28px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #337FFF;
- text-align: center;
- line-height: 80px;
- background-color: #fff;
- }
-
- .button2 {
- margin-right: 32px;
- width: 311px;
- height: 80px;
- background: #68b4ff;
- border-radius: 44px;
- font-size: 32px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- text-align: center;
- line-height: 80px;
- }
-
- .activeButton {
- margin-right: 32px;
- width: 311px;
- height: 80px;
- background: #337FFF;
- border-radius: 44px;
- font-size: 32px;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #fff;
- text-align: center;
- line-height: 80px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/customerEditor/index.tsx b/src/pages/customerEditor/index.tsx
deleted file mode 100644
index 749f118..0000000
--- a/src/pages/customerEditor/index.tsx
+++ /dev/null
@@ -1,386 +0,0 @@
-import { Button, View } from '@tarojs/components'
-import Taro, { setNavigationBarTitle, useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import type { ReactNode } from 'react'
-import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import Remark from '../orderDetails/components/remark'
-import styles from './index.module.scss'
-import Form from './components/Form'
-import Popup from '@/components/popup'
-import { debounce } from '@/common/util'
-import { alert, goLink } from '@/common/common'
-import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format'
-import Address from '@/components/address'
-import { MpPurchaser, MpPurchaserPost, MpPurchaserPut } from '@/api/customer'
-// 卡片盒子元素
-interface Obs {
- title?: string
- modeName?: string
- showMode?: boolean
- children?: ReactNode
- clickNode?: () => void
-}
-
-const DefaultBox = (props: Obs) => {
- const {
- title = '标题',
- modeName = '大货',
- showMode = false,
- children,
- clickNode,
- } = props
-
- return (
-
-
- {title}
- {
- showMode && clickNode?.()}>{modeName}
- }
-
-
- {children}
-
- )
-}
-const DefaultBoxWithMemo = memo(DefaultBox)
-
-interface AddressParms {
- id: number
- name: string
-}
-const CustomerEditor = () => {
- const router = useRouter()
-
- const [infoObj, setinfoObj] = useState()
-
- const [formData, setformData] = useState()
-
- const [addressArr, setaddressArr] = useState([])
-
- // 默认业务员
- useDidShow(() => {
- if (router.params.type === 'add') {
- setNavigationBarTitle({ title: '新增客户' })
- }
- else {
- setNavigationBarTitle({ title: '客户编辑' })
- }
- const userInfo = JSON.parse(Taro.getStorageSync('userInfo'))
- // 获取选择的客户
- const pages = Taro.getCurrentPages()
- const currPage = pages[pages.length - 1] // 获取当前页面
- // 判断是否有跳转选择业务员
- if (currPage.data?.saleuserId && currPage.data?.saleuserId !== '') {
- setformData(val => ({
- ...val,
- sale_user_id: currPage.data?.saleuserId,
- sale_user_name: currPage.data?.saleuserName,
- }))
- }
- // 默认业务员
- if (currPage.data?.saleuserId == null) {
- setformData(e => ({
- ...e,
- sale_user_id: userInfo?.user_id,
- sale_user_name: userInfo?.user_name,
- }))
- }
- })
-
- const { fetchData: getDesc } = MpPurchaser()
-
- const handTitle = useCallback((e) => {
- setformData(val => ({ ...val, name: e }))
- }, [])
-
- const handName = useCallback((e) => {
- setformData(val => ({ ...val, short_name: e }))
- }, [])
-
- const handUsername = useCallback((e) => {
- setformData(val => ({ ...val, director: e }))
- }, [])
-
- const handUserPhone = useCallback((e) => {
- setformData(val => ({ ...val, phone: e }))
- }, [])
-
- const handAddress = useCallback((e) => {
- setformData(val => ({ ...val, address_detail: e }))
- }, [])
-
- // 客户类型数组
- const [list, setlist] = useState([
- {
- id: 1,
- name: '布行',
- check: false,
- },
- {
- id: 2,
- name: '二批',
- check: false,
- },
- {
- id: 3,
- name: '制衣厂',
- check: false,
- },
- ])
-
- // 选择客户类型
- const handItem = (item) => {
- list.map((it) => {
- if (it.id === item.id) {
- it.check = true
- }
- else {
- it.check = false
- }
- return it
- })
- setlist([...list])
- setformData(val => ({ ...val, purchaser_type: item.id }))
- }
- // 备注操作
- const [remarkDesc, setremarkDesc] = useState('')
- const getInfo = async() => {
- Taro.showLoading({
- title: '请稍等...',
- mask: true,
- })
- const res = await getDesc({ id: router.params.id })
- setinfoObj(res.data)
- list.map((item) => {
- if (item.id == res.data.purchaser_type) {
- item.check = true
- }
- else {
- item.check = false
- }
- return item
- })
- setlist([...list])
- setformData({
- sale_user_id: res.data?.sale_user_id,
- sale_user_name: res.data?.sale_user_name,
- name: res.data?.name,
- short_name: res.data?.short_name,
- director: res.data?.director,
- phone: res.data?.phone,
- addressName: res.data?.province_name + res.data?.city_name + res.data?.district_name,
- address_detail: res.data?.address_detail,
- purchaser_type: res.data?.purchaser_type,
- district_id: res.data?.district_id,
- })
- setremarkDesc(res.data?.remark)
- let arr: any[] = []
- arr = [
- { id: res.data.province_id, name: res.data.province_name },
- { id: res.data.city_id, name: res.data.city_name },
- { id: res.data.district_id, name: res.data.district_name },
- ]
- setaddressArr([...arr])
- Taro.hideLoading()
- }
-
- const [showDesc, setShowDesc] = useState(false)
- const getRemark = useCallback(async(e) => {
- setShowDesc(false)
- setremarkDesc(e)
- // setformData((val) => ({ ...val, remark: e }))
- }, [])
-
- // 地址选择
- const [showSiteModal, setShowSiteModal] = useState(false)
-
- const handleSetSite = (ev) => {
- const addressName: any = []
- ev.forEach((v) => {
- addressName.push(v?.name)
- })
- if (ev.length === 3) {
- setShowSiteModal(false)
- setformData(val => ({ ...val, addressName: ev[0]?.name + ev[1]?.name + ev[2]?.name || '', district_id: ev[2]?.id }))
- }
- }
-
- const onClose = () => {
- setShowSiteModal(false)
- }
- useEffect(() => {
- if (router.params.type === 'edit') {
- getInfo()
- }
- }, [])
- const isDisabled = useMemo(() => {
- let count = 0
- for (const i in formData) {
- count++
- }
- console.log(formData, '5555')
- console.log(count, '6666')
- let empty: any = null
- if (typeof (formData) == 'undefined') { return }
- for (const key in formData) {
- if (key in formData) {
- if (formData[key] !== '' && typeof (formData[key]) !== 'undefined' && count === 10) {
- empty = false
- }
- else {
- empty = true
- break
- }
- }
- }
- return empty
- }, [formData])
-
- // 重置
- const handReset = () => {
- setformData({
- sale_user_id: '',
- sale_user_name: '',
- name: '',
- short_name: '',
- director: '',
- phone: '',
- addressName: '',
- address_detail: '',
- purchaser_type: '',
- remark: '',
- district_id: '',
- })
- }
-
- const { fetchData: postFetch } = MpPurchaserPost()
- const { fetchData: putFetch } = MpPurchaserPut()
- // 提交
- const handSure = async() => {
- // if (!isDisabled) return false
- const query = {
- ...formData,
- remark: remarkDesc,
- id: infoObj?.id,
- }
- if (router.params.type == 'add') {
- delete query.id
- }
- Taro.showModal({
- content: '确定要提交吗?',
- confirmText: '确认',
- cancelText: '取消',
- async success(res) {
- if (res.confirm) {
- const res = await (router.params.type == 'add' ? postFetch(query) : putFetch(query))
- Taro.showLoading({
- title: '请稍等...',
- mask: true,
- })
- if (res.msg === 'success') {
- Taro.showToast({
- title: '成功',
- })
- Taro.hideLoading()
- Taro.navigateBack({
- delta: 1,
- })
- }
- else {
- Taro.showToast({
- title: res.msg,
- icon: 'error',
- })
- }
- }
- },
- })
- }
-
- return (
- <>
-
-
-
-
-
-
-
-
-
-
-
- `} clickNode={() => setShowDesc(true)}>
- {remarkDesc === '' ? '尚未备注信息' : remarkDesc}
-
- setShowDesc(false)}>
- {
- showDesc && getRemark(e)} defaultValue={infoObj?.remark} />
- }
-
- handleSetSite(val)} defaultValue={addressArr} addressOnClose={() => onClose()} show={showSiteModal} />
-
-
-
-
-
- >
- )
-}
-export default CustomerEditor
diff --git a/src/pages/customerManagement/components/ChoseCity/index.module.scss b/src/pages/customerManagement/components/ChoseCity/index.module.scss
deleted file mode 100644
index 0a429fd..0000000
--- a/src/pages/customerManagement/components/ChoseCity/index.module.scss
+++ /dev/null
@@ -1,30 +0,0 @@
-.mainBox {
-
- .scrollView {
- height: 500px;
-
-
- .itemBox {
- margin-left: 53px;
- margin-right: 27px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 82px;
- border-bottom: 1px solid #f9f9f9;
-
- .itemProvince {
- font-size: 28px;
- font-weight: 400;
- color: #000000;
- }
-
- .activeitemProvince {
- font-size: 28px;
- font-weight: 400;
- color: #337FFF;
- }
-
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/customerManagement/components/ChoseCity/index.tsx b/src/pages/customerManagement/components/ChoseCity/index.tsx
deleted file mode 100644
index 1dd6f31..0000000
--- a/src/pages/customerManagement/components/ChoseCity/index.tsx
+++ /dev/null
@@ -1,224 +0,0 @@
-import { ScrollView, View } from '@tarojs/components'
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import React, { ReactNode, forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import Tabs from '../tabs'
-import styles from './index.module.scss'
-import { alert } from '@/common/common'
-import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format'
-import DropDownItem from '@/components/dropDown-item'
-import { GetAddressListApi } from '@/api/addressList'
-import IconFont from '@/components/iconfont/iconfont'
-
-interface Props {
- handCity?: (province: any, city: any) => void
- value?: any
- onCloseOverlay?: () => void
-}
-const ChoseCity = (props: Props, ref) => {
- const DropDownItemRef = useRef()
- const close = () => {
- DropDownItemRef.current.closePopup()
- }
- useImperativeHandle(
- ref,
- () => {
- return {
- show: DropDownItemRef?.current?.show,
- showPopup: DropDownItemRef?.current.showPopup,
- closePopup: DropDownItemRef?.current?.closePopup,
- }
- },
- [DropDownItemRef?.current],
- )
-
- // 获取地址
- const { fetchData } = GetAddressListApi()
-
- // 已选的集合市
- // const [choseCityArr, setchoseCityArr] = useState([])
- const choseCityArr = useRef({ list: [] })
-
- // 省数组
- const [list, setlist] = useState([])
- // 区数组
- const [cityList, setcityList] = useState([])
- // 获取省
- const getProvince = async() => {
- const res = await fetchData({ parent_id: 1 })
- if (res.data) {
- setlist([...res.data.list])
- }
- }
- useEffect(() => {
- getProvince()
- }, [])
- // 区分在哪一栏
- const [currentValue, setCurrentValue] = useState(1)
-
- // 顶部栏
- const [TarBarList, setTarBarList] = useState([{ id: 1, name: '选择省', showBorder: true }, { id: 2, name: '选择市', showBorder: false }])
- const handChose = (item) => {
- TarBarList.forEach((it) => {
- if (it.id === item.id) {
- it.showBorder = true
- }
- else {
- it.showBorder = false
- }
- setTarBarList([...TarBarList])
- setCurrentValue(item.id)
- })
- }
-
- // 获取市
- const getCity = async(id) => {
- const res = await fetchData({ parent_id: id })
- if (res.data) {
- res.data.list.map((item) => {
- choseCityArr.current.list.forEach((it) => {
- if (item.id == it.id) {
- item.check = true
- }
- })
- return item
- })
- setcityList([...res.data.list])
- }
- const provinceArr = list.filter((next) => { return next.check })
- props.handCity?.(provinceArr, choseCityArr.current.list)
- }
- // 选择省
- const handProvince = (item) => {
- list.map((it) => {
- if (item.id == it.id) {
- it.check = true
- }
- return it
- })
- setlist([...list])
- getCity(item.id)
- setCurrentValue(2)
- TarBarList.map((it) => {
- if (it.id == currentValue) {
- it.name = item.name
- it.showBorder = false
- }
- else {
- it.showBorder = true
- }
-
- return it
- })
- setTarBarList([...TarBarList])
- }
- // 选择市
- const handCity = (item) => {
- cityList.map((it) => {
- if (item.id == it.id) {
- it.check = !it.check
- }
- return it
- })
- setcityList([...cityList])
- const cityArr = cityList.filter((next) => { return next.check })
- if (item.check) {
- choseCityArr.current.list.push(item)
- }
- else {
- deleteById(item.id, choseCityArr.current.list)
- }
- // 将市区的全部不选后,该省的颜色不高亮
- if (cityArr.length == 0) {
- list.map((item) => {
- if (cityList[0]?.parent_id == item.id) {
- item.check = false
- }
- return item
- })
- setlist([...list])
- }
- const provinceArr = list.filter((next) => { return next.check })
- props.handCity?.(provinceArr, choseCityArr.current.list)
- }
-
- /**
- * 根据id删除数组项
- * @param {Number} id 需要删除的id
- * @param {Array} list 目标数组
- *
- * @return {Array}
- */
- function deleteById(id, list) {
- for (let index = list.length - 1; index >= 0; index--) {
- if (list[index] && list[index].id === id) {
- list.splice(index, 1)
- }
- }
- return list
- }
-
- // 重置
- const handReset = () => {
- TarBarList.map((item, index) => {
- if (index == 0) {
- item.name = '选择省'
- item.showBorder = true
- }
- else {
- item.showBorder = false
- }
- return item
- })
- setTarBarList([...TarBarList])
- setCurrentValue(1)
- choseCityArr.current.list = []
- list.map((item) => {
- item.check = false
- return item
- })
- setlist([...list])
- cityList.map((item) => {
- item.check = false
- return item
- })
- setcityList([...cityList])
- props.handCity?.('', '')
- }
- return (
-
-
- handChose?.(item)} handReset={() => handReset()}>
- {
- currentValue == 1 &&
- {
- list.map((item, key) => {
- return (
- handProvince(item)}>
- {item.name}
-
-
- )
- })
- }
-
- }
- {
- currentValue == 2 &&
- {
- cityList.map((item, key) => {
- return (
- handCity(item)}>
- {item.name}
- {/* */}
-
- )
- })
- }
-
- }
-
-
- )
-}
-export default memo(forwardRef(ChoseCity))
diff --git a/src/pages/customerManagement/components/ItemList/index.module.scss b/src/pages/customerManagement/components/ItemList/index.module.scss
deleted file mode 100644
index 5989157..0000000
--- a/src/pages/customerManagement/components/ItemList/index.module.scss
+++ /dev/null
@@ -1,122 +0,0 @@
-.mainItem {
- margin-left: 24px;
- margin-right: 24px;
- margin-bottom: 24px;
- background: #fff;
- overflow: hidden;
- padding-bottom: 16px;
- border-radius: 16px;
-
- .itemTop {
- margin-top: 36px;
- display: flex;
- justify-content: space-between;
-
- .itemLeft {
- margin-left: 24px;
- display: flex;
- align-items: center;
- .itemCile {
- width: 78px;
- height: 78px;
- background: linear-gradient(337deg, #7bb7ff 0%, #4581ff 100%);
- font-size: 32px;
- font-weight: 500;
- color: #ffffff;
- text-align: center;
- line-height: 78px;
- border-radius: 50%;
- margin-right: 32px;
- }
-
- .item_top_one {
- .item_top_one_flex {
- display: flex;
- align-items: center;
-
- .itemName {
- font-size: 28px;
- font-weight: 550;
- color: #000000;
- margin-right: 24px;
- }
-
- .itemPhone {
- font-size: 28px;
- font-weight: 400;
- color: #6e6e6e;
- }
- }
-
- .item_tag_box {
- margin-top: 16px;
- display: flex;
- align-items: center;
- flex-wrap: wrap;
-
- .item_tagItem {
- margin-bottom: 5px;
- margin-right: 16px;
- padding: 4px 10px 4px 10px;
- font-size: 24px;
- font-weight: 500;
- color: #4581ff;
- background: #ecf2ff;
- border-radius: 8px;
- border: none;
- }
- }
- }
- }
-
- .itemRight {
- display: flex;
-
- .phoneFont {
- // margin-right: 40px;
- margin-left: 16px;
- font-size: 24px;
- font-weight: 400;
- color: #4581ff;
- width: 100rpx;
- }
- }
- }
-
- .line {
- height: 1px;
- background: #000000;
- opacity: 0.1;
- margin-right: 24px;
- margin-left: 24px;
- margin-top: 20px;
- margin-bottom: 16px;
- }
-
- .flex_bottom {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding-left: 24px;
- padding-right: 24px;
- font-size: 24px;
- font-weight: 400;
- color: #000000;
-
- .flex_left {
- width: 50%;
- color: #999999;
- font-weight: 400;
- font-size: 24px;
- @include common_ellipsis();
- }
-
- .flex_right {
- width: 50%;
- text-align: left;
- color: #999999;
- font-weight: 400;
- font-size: 24px;
- }
- }
-}
diff --git a/src/pages/customerManagement/components/ItemList/index.tsx b/src/pages/customerManagement/components/ItemList/index.tsx
deleted file mode 100644
index 8b9bd3c..0000000
--- a/src/pages/customerManagement/components/ItemList/index.tsx
+++ /dev/null
@@ -1,107 +0,0 @@
-import { View } from '@tarojs/components'
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import React, { ReactNode, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-import { alert } from '@/common/common'
-import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format'
-import IconFont from '@/components/iconfont/iconfont'
-import Tag from '@/components/tag'
-
-interface Props {
- obj: any
- sortId: number | string
-}
-const ItemList = (props: Props) => {
- const handPhone = (e) => {
- e.stopPropagation()
- Taro.makePhoneCall({
- phoneNumber: props.obj?.real_phone,
- })
- }
-
- const handNav = () => {
- Taro.navigateTo({
- url: `/pages/customerDetails/index?purchaser_id=${props.obj?.id}`,
- })
- }
-
- const time = useMemo(() => {
- if (props?.sortId == '' || !props?.sortId) {
- return props?.obj?.recent_order_time
- }
- if (props?.sortId == 1 || props?.sortId == -1) {
- return props?.obj?.recent_order_time
- }
- if (props?.sortId == 2 || props?.sortId == -2) {
- return props?.obj?.create_time
- }
- if (props?.sortId == 3 || props?.sortId == -3) {
- return props?.obj?.update_time
- }
- }, [props?.sortId])
-
- const timeFont = useMemo(() => {
- if (props?.sortId == '' || !props?.sortId) {
- return '下单时间'
- }
- if (props?.sortId == 1 || props?.sortId == -1) {
- return '下单时间'
- }
- if (props?.sortId == 2 || props?.sortId == -2) {
- return '创建时间'
- }
- if (props?.sortId == 3 || props?.sortId == -3) {
- return '更新时间'
- }
- }, [props?.sortId])
-
- return (
- handNav()}>
-
-
-
- {props.obj.name[0]}
-
-
-
- {props.obj.name}
- {props.obj.phone}
-
-
-
- {props.obj.purchaser_type_name || '暂无'}
-
-
- {props.obj.sale_user_name || '暂无'}
-
- {
- props.obj?.label_list?.map((item, key) => {
- return (
-
- {item.label_name}
-
- )
- })
- }
-
- {props.obj.platform_source_name}
-
-
-
-
- handPhone(e)}>
-
-
- 联系TA
-
-
-
-
- {props.obj.default_address.province_name + props.obj.default_address.city_name + props.obj.default_address.district_name || '暂无'}
- {timeFont}:{formatDateTime(time, 'YYYY-MM-DD HH:mm') || '暂无'}
-
-
- )
-}
-export default memo(ItemList)
diff --git a/src/pages/customerManagement/components/Sort/index.module.scss b/src/pages/customerManagement/components/Sort/index.module.scss
deleted file mode 100644
index 8d10c1f..0000000
--- a/src/pages/customerManagement/components/Sort/index.module.scss
+++ /dev/null
@@ -1,24 +0,0 @@
-.mainBox {
- display: flex;
- flex-wrap: wrap;
- padding-left: 40px;
-
- .itemFlex {
- padding: 20px 18px 20px 18px;
- background: #f6f6f6;
- border: 1px solid #f6f6f6;
- font-size: 28px;
- font-weight: 400;
- color: #9a9a9a;
- margin-right: 24px;
- margin-bottom: 24px;
- border-radius: 16px;
- }
-
- .active {
- background: rgba(51, 127, 255, 0.1);
- border: 1px solid #337fff;
- color: #337fff;
- font-weight: 550;
- }
-}
diff --git a/src/pages/customerManagement/components/Sort/index.tsx b/src/pages/customerManagement/components/Sort/index.tsx
deleted file mode 100644
index 7d9262f..0000000
--- a/src/pages/customerManagement/components/Sort/index.tsx
+++ /dev/null
@@ -1,108 +0,0 @@
-import { View } from '@tarojs/components'
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import React, { ReactNode, forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-import { alert } from '@/common/common'
-import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format'
-import DropDownItem from '@/components/dropDown-item'
-
-interface Props {
- handSort?: (any) => void
- value?: any
- onCloseOverlay?: () => void
-}
-
-interface ListType {
- name: string
- id: string
- checked: boolean
-}
-const Sort = (props: Props, ref) => {
- const DropDownItemRef = useRef()
- useImperativeHandle(
- ref,
- () => {
- return {
- show: DropDownItemRef?.current?.show,
- showPopup: DropDownItemRef?.current.showPopup,
- closePopup: DropDownItemRef?.current?.closePopup,
- }
- },
- [DropDownItemRef?.current],
- )
-
- const [list, setlist] = useState([
- {
- name: '下单时间正序',
- id: '1',
- checked: false,
- },
- {
- name: '创建时间正序',
- id: '2',
- checked: false,
- },
- {
- name: '更新时间正序',
- id: '3',
- checked: false,
- },
- {
- name: '下单时间倒序',
- id: '-1',
- checked: false,
- },
- {
- name: '创建时间倒序',
- id: '-2',
- checked: false,
- },
- {
- name: '更新时间倒序',
- id: '-3',
- checked: false,
- },
- ])
-
- const [currentValue, setCurrentValue] = useState(-1)
-
- const handItem = (it) => {
- list.map((item) => {
- if (item.id == it.id) {
- item.checked = true
- }
- else {
- item.checked = false
- }
- return item
- })
- setlist([...list])
- props.handSort?.(it.id)
- }
-
- const title = useMemo(() => {
- const arr = list.filter((item) => { return item.checked })
- if (!arr.length) {
- return '默认排序'
- }
- else {
- return arr[0]?.name
- }
- }, [list])
-
- return (
-
-
- {
- list.map((item, index) => {
- return (
- handItem?.(item)}>{item.name}
- )
- })
- }
-
-
- )
-}
-export default memo(forwardRef(Sort))
diff --git a/src/pages/customerManagement/components/Tag/index.module.scss b/src/pages/customerManagement/components/Tag/index.module.scss
deleted file mode 100644
index 2977995..0000000
--- a/src/pages/customerManagement/components/Tag/index.module.scss
+++ /dev/null
@@ -1,44 +0,0 @@
-.mainBox {
- .pussTitle {
- font-size: 28px;
- font-weight: 500;
- color: #000000;
- margin-bottom: 24px;
- margin-left: 40px;
- margin-top: 15px;
- }
-
- .pussBox {
- display: flex;
- flex-wrap: wrap;
- padding-left: 40px;
-
- .itemFlex {
- min-width: 80px;
- padding: 20px 60px 20px 60px;
- background: #f6f6f6;
- border: 1px solid #f6f6f6;
- font-size: 28px;
- font-weight: 400;
- color: #777777;
- margin-right: 24px;
- margin-bottom: 24px;
- border-radius: 16px;
- text-align: center;
- }
-
- .active {
- background: rgba(51, 127, 255, 0.1);
- border: 1px solid #337fff;
- font-weight: 500;
- color: #337fff;
- min-width: 80px;
- font-size: 28px;
- padding: 20px 60px 20px 60px;
- margin-right: 24px;
- margin-bottom: 24px;
- border-radius: 16px;
- text-align: center;
- }
- }
-}
diff --git a/src/pages/customerManagement/components/Tag/index.tsx b/src/pages/customerManagement/components/Tag/index.tsx
deleted file mode 100644
index 9b5edec..0000000
--- a/src/pages/customerManagement/components/Tag/index.tsx
+++ /dev/null
@@ -1,152 +0,0 @@
-import { View } from '@tarojs/components'
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import React, { ReactNode, forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-import { alert } from '@/common/common'
-import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format'
-import { EnumPurchaserType } from '@/api/order'
-import DropDownItem from '@/components/dropDown-item'
-import { EnumSourcePlatform, MpPurchaserList } from '@/api/customer'
-
-interface Props {
- handType: (any) => void
- handTags: (any) => void
- handPlatform: (any) => void
- value?: any
- onCloseOverlay?: () => void
-}
-const Tag = (props: Props, ref) => {
- const DropDownItemRef = useRef()
- useImperativeHandle(
- ref,
- () => {
- return {
- show: DropDownItemRef?.current?.show,
- showPopup: DropDownItemRef?.current.showPopup,
- closePopup: DropDownItemRef?.current?.closePopup,
- }
- },
- [DropDownItemRef?.current],
- )
- const [currentValue, setCurrentValue] = useState(-1)
-
- const [list, setlist] = useState([
- {
- name: '二批',
- id: 0,
- checked: false,
- },
- {
- name: '制衣厂',
- id: 1,
- checked: false,
- },
- {
- name: '布行',
- id: 2,
- checked: false,
- },
- ])
-
- const { fetchData: fetchPurchaserType } = EnumPurchaserType()
-
- const { fetchData: fetchSourcePlatform } = EnumSourcePlatform()
-
- const { fetchData } = MpPurchaserList()
- const [taglist, settaglist] = useState([])
- const [platformList, setPlatformList] = useState([])
- const getList = async() => {
- const res = await fetchData()
- const purchaserType = await fetchPurchaserType()
- const sourcePlatform = await fetchSourcePlatform()
- if (res.data) {
- settaglist([...res.data.list])
- setlist([...purchaserType.data.list])
- setPlatformList([...sourcePlatform.data.list])
- }
- }
- useEffect(() => {
- getList()
- }, [])
-
- const handItem = (it) => {
- list.map((item) => {
- if (item.id == it.id) {
- item.checked = true
- }
- else {
- item.checked = false
- }
- return item
- })
- setlist([...list])
- props.handType(list)
- }
-
- const handTag = (it) => {
- taglist.map((item) => {
- if (item.id == it.id) {
- item.checked = !item.checked
- }
- return item
- })
- settaglist([...taglist])
- props.handTags(taglist)
- }
-
- const handlePlatformSource = (it) => {
- platformList.map((item) => {
- if (item.id == it.id) {
- item.checked = !item.checked
- }
- return item
- })
- setPlatformList([...platformList])
- props?.handPlatform(platformList)
- }
-
- return (
-
-
- 客户类型
-
- {
- list.map((item, index) => {
- return (
- handItem(item)}>{item.name}
- )
- })
- }
-
- 自定义标签
-
- {
- taglist.map((item, index) => {
- return (
- handTag(item)}>{item.name}
- )
- })
- }
-
- 平台来源
-
- {
- platformList.map((item, index) => {
- // 过滤 未知
- if (item.id !== 0) {
- return (
- handlePlatformSource(item)}>{item.name}
- )
- }
- else {
- return null
- }
- })
- }
-
-
-
- )
-}
-export default memo(forwardRef(Tag))
diff --git a/src/pages/customerManagement/components/tabs/index.module.scss b/src/pages/customerManagement/components/tabs/index.module.scss
deleted file mode 100644
index 5a9bf05..0000000
--- a/src/pages/customerManagement/components/tabs/index.module.scss
+++ /dev/null
@@ -1,55 +0,0 @@
-.main {
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- .resetBox {
- font-size: 28px;
- font-weight: 500;
- color: #337FFF;
- margin-right: 48px;
- }
-}
-
-.flexBox {
- // width: 100%;
- height: 102px;
- background: #ffffff;
- display: flex;
- padding-left: 53px;
-
- .itemBox {
- position: relative;
- min-width: 88px;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- text-align: center;
- height: 102px;
- margin-right: 40px;
-
- .itemFont {
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Bold;
- font-weight: 400;
- color: #000000;
- }
-
- .activeItems {
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 700;
- color: #337FFF;
- }
-
- .borderBox {
- position: absolute;
- bottom: 0;
- width: 88px;
- height: 6px;
- background: #337FFF;
- border-radius: 4px;
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/customerManagement/components/tabs/index.tsx b/src/pages/customerManagement/components/tabs/index.tsx
deleted file mode 100644
index a745b5b..0000000
--- a/src/pages/customerManagement/components/tabs/index.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { Button, Input, View } from '@tarojs/components'
-import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-
-interface Props {
- list: any[]
- handChose?: (any) => void
- handReset?: () => void
-}
-const Tabs = (props: Props) => {
- const { list = [], handChose } = props
-
- return (
-
-
- {
- list.map((item, index) => {
- return (
- handChose?.(item)}>
- {item?.name}
- {
- item.showBorder &&
- }
-
- )
- })
- }
-
-
- props?.handReset?.()}>重置
-
- )
-}
-export default memo(Tabs)
diff --git a/src/pages/customerManagement/index.config.ts b/src/pages/customerManagement/index.config.ts
deleted file mode 100644
index c87840b..0000000
--- a/src/pages/customerManagement/index.config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export default {
- navigationBarTitleText: '客户列表',
-}
diff --git a/src/pages/customerManagement/index.module.scss b/src/pages/customerManagement/index.module.scss
deleted file mode 100644
index 4517213..0000000
--- a/src/pages/customerManagement/index.module.scss
+++ /dev/null
@@ -1,61 +0,0 @@
-.mainBox {
- .topBox {
- width: 100%;
- position: sticky;
- top: 0;
- z-index: 999;
- // padding-bottom: 24px;
- background: #fff;
- // overflow: hidden;
-
- .search_input {
- padding-top: 8px;
- margin-left: 24px;
- margin-right: 24px;
- margin-bottom: 10px;
- }
-
- .menuBox {
- width: 100%;
- display: flex;
- flex: 1;
- }
- }
-
- .totalFont {
- margin-top: 24px;
- margin-left: 24px;
- font-size: 26px;
- font-weight: 400;
- color: #aeaeae;
- margin-bottom: 15px;
- }
-
- .order_list {
- height: calc(100vh - env(safe-area-inset-bottom) - 200px);
- background: #f7f7f7;
- }
-
- .bottom_box {
- height: 160px;
- background: #ffffff;
- position: fixed;
- bottom: 0;
- z-index: 1;
-
- .bottom_btn {
- margin-top: 16px;
- margin-left: 24px;
- margin-right: 24px;
- width: 702px;
- height: 80px;
- background: #337fff;
- border-radius: 44px;
- line-height: 80px;
- text-align: center;
- font-size: 28px;
- font-weight: 500;
- color: #ffffff;
- }
- }
-}
diff --git a/src/pages/customerManagement/index.tsx b/src/pages/customerManagement/index.tsx
deleted file mode 100644
index 77d4517..0000000
--- a/src/pages/customerManagement/index.tsx
+++ /dev/null
@@ -1,187 +0,0 @@
-import { View } from '@tarojs/components'
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import React, { ReactNode, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-import Tag from './components/Tag'
-import Sort from './components/Sort'
-import ChoseCity from './components/ChoseCity'
-import ItemList from './components/ItemList'
-import Popup from '@/components/popup'
-import { dataLoadingStatus, debounce, getFilterData } from '@/common/util'
-import { alert, goLink } from '@/common/common'
-import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format'
-import Search from '@/components/search'
-import InfiniteScroll from '@/components/infiniteScroll'
-import { ClientListApi } from '@/api/order'
-import SelectGroup from '@/components/SelectGroup'
-
-const CustomerManagement = () => {
- const [searchField, setSearchField] = useState<
- {
- page: number
- size: number
- label_ids: string
- purchaser_type: number | string
- name_phone_or_sale_user: string
- province_id: any[] | string
- city_id: any[] | string
- abstract_sort_key: string
- platform_source: string
- }
- >({
- page: 1,
- size: 10,
- label_ids: '',
- purchaser_type: '',
- name_phone_or_sale_user: '',
- province_id: '',
- city_id: '',
- abstract_sort_key: '',
- platform_source: '',
- })
-
- const [orderData, setOrderData] = useState<{ list: any[]; total: number }>({ list: [], total: 0 })
- const { fetchData: listFetchData, state: orderState } = ClientListApi()
-
- // 列表下拉刷新
- const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false)
- const getOrderList = async() => {
- const res = await listFetchData({
- ...getFilterData(searchField),
- })
- setOrderData(e => ({ ...e, list: res.data?.list, total: res.data?.total }))
- setRefresherTriggeredStatus(() => false)
- }
-
- // 监听筛选条件变化
- useEffect(() => {
- getOrderList()
- }, [searchField])
-
- // 数据加载状态
- const statusMore = useMemo(() => {
- return dataLoadingStatus({ list: orderData.list, total: orderData.total, status: orderState.loading! })
- }, [orderData, orderState])
-
- // 上拉加载数据
- const pageNum = useRef({ size: searchField.size, page: searchField.page })
- // 输入了搜索关键字
- const getSearchData = useCallback((e) => {
- pageNum.current.page = 1
- setOrderData(() => ({ list: [], total: 0 }))
- setSearchField(val => ({ ...val, name_phone_or_sale_user: e, size: 10 }))
- }, [])
- const getScrollToLower = useCallback(() => {
- if (orderData.list.length < orderData.total) {
- pageNum.current.page++
- const size = pageNum.current.size * pageNum.current.page
- setSearchField({ ...searchField, size })
- }
- }, [orderData])
-
- const getRefresherRefresh = async() => {
- pageNum.current.page = 1
- setRefresherTriggeredStatus(true)
- setSearchField(val => ({ ...val, size: 10 }))
- }
-
- // 选择排序
- const sortRefRef = useRef()
- const handSort = useCallback((e: string) => {
- pageNum.current.page = 1
- setSearchField(val => ({ ...val, size: 10, abstract_sort_key: e }))
- sortRefRef.current = e
- }, [])
-
- const SortRef = useRef()
- const TagRef = useRef()
-
- // 筛选城市
- const ChoseCityRef = useRef()
- const handCity = useCallback((provinceVal, cityVal) => {
- const provinceArr: number[] = []
- const cityArr: number[] = []
- provinceVal.length && provinceVal.forEach((item) => {
- provinceArr.push(item.id)
- })
- cityVal.length && cityVal.forEach((item) => {
- cityArr.push(item.id)
- })
- pageNum.current.page = 1
- const provinceRes = provinceArr?.toString()
- const cityRes = cityArr?.toString()
- console.log(provinceRes, cityRes)
- setSearchField(val => ({ ...val, province_id: provinceArr.length > 0 ? provinceRes : '', city_id: cityArr.length > 0 ? cityRes : '', size: 10 }))
- // ChoseCityRef.current.close()
- }, [])
-
- // 选择客户类型
- const handType = useCallback((val) => {
- const arr = val.filter((item) => { return item.checked })
- pageNum.current.page = 1
- setSearchField(val => ({ ...val, size: 10, purchaser_type: arr[0]?.id }))
- }, [])
-
- // 选择标签
- const handTags = useCallback((val) => {
- const arr: any[] = []
- const arrOne = val.filter((item) => { return item.checked })
- arrOne.forEach((item) => {
- arr.push(item.id)
- })
- pageNum.current.page = 1
- const res = arr.toString()
- setSearchField(val => ({ ...val, size: 10, label_ids: arr.length === 0 ? '' : res }))
- }, [])
-
- // 选择标签
- const handPlatform = useCallback((val) => {
- const arr: any[] = []
- const arrOne = val.filter((item) => { return item.checked })
- arrOne.forEach((item) => {
- arr.push(item.id)
- })
- pageNum.current.page = 1
- const res = arr.toString()
- setSearchField(val => ({ ...val, size: 10, platform_source: arr.length === 0 ? '' : res }))
- }, [])
-
- return (
-
-
-
-
-
-
-
- true}>
- true}>
- true}>
-
-
-
- 共 {orderData?.total || 0} 个客户
-
-
- {orderData?.list?.map((item, index) => {
- return (
-
- )
- })}
-
-
-
- goLink('/pages/customerEditor/index?type=add')}>新增客户
-
-
- )
-}
-
-export default CustomerManagement
diff --git a/src/pages/customerPage/index.config.ts b/src/pages/customerPage/index.config.ts
deleted file mode 100644
index 4dc41dc..0000000
--- a/src/pages/customerPage/index.config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export default {
- navigationBarTitleText: '选择客户',
-}
diff --git a/src/pages/customerPage/index.module.scss b/src/pages/customerPage/index.module.scss
deleted file mode 100644
index 1a0a1ee..0000000
--- a/src/pages/customerPage/index.module.scss
+++ /dev/null
@@ -1,80 +0,0 @@
-page {
- background: #f7f7f7;
-}
-
-.cussBox {
- .searchBox {
- position: sticky;
- top: 0;
- width: 100%;
- height: 96px;
- background: #ffffff;
- display: flex;
- align-items: center;
-
- .two {
- width: 702px;
- height: 72px;
- margin-left: 24px;
- }
- }
-
- .listBox {
- height: calc(100vh - 170px);
- }
-
- .itemBox {
- margin-left: 24px;
- margin-right: 24px;
- padding: 0 36px;
- height: 104px;
- background: #ffffff;
- border-radius: 16px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-top: 24px;
- box-sizing: border-box;
-
- .cussName {
- flex: 1;
- height: 34px;
- font-size: 28px;
- font-weight: 500;
- color: #000000;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .platform_source_name {
- flex: 1;
- }
-
- .phone {
- flex: 1;
- font-size: 28px;
- color: #000000;
- }
-
- .woker {
- flex: 1;
- font-size: 28px;
- color: #000000;
- text-align: right;
- }
- }
-
- .acticveitemBox {
- border: 1px solid #337fff;
- }
-}
-.platform_name {
- background: #ecf2ff;
- border-radius: 6px;
- margin-left: 10px;
- font-size: 20px;
- border: none !important;
- text-align: center;
- color: #007aff;
- padding: 4px 10px;
-}
diff --git a/src/pages/customerPage/index.tsx b/src/pages/customerPage/index.tsx
deleted file mode 100644
index 886bde7..0000000
--- a/src/pages/customerPage/index.tsx
+++ /dev/null
@@ -1,159 +0,0 @@
-import { Button, Image, Input, ScrollView, View } from '@tarojs/components'
-import Taro, { useDidShow, useRouter } from '@tarojs/taro'
-import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-import Search from '@/components/search'
-import { ClientListApi } from '@/api/order'
-import InfiniteScroll from '@/components/infiniteScroll'
-import { dataLoadingStatus, getFilterData } from '@/common/util'
-import Tag from '@/components/tag'
-
-const CustomerPage = () => {
- const [search, setSearch] = useState({
- name_phone_or_sale_user: null,
- page: 1,
- size: 10,
- })
- const [clentList, setClientlist] = useState<{ list: any[]; total: number }>({ list: [], total: 0 })
-
- const { fetchData: clitentFetch, state: orderState } = ClientListApi()
- // 数据加载状态
- const statusMore = useMemo(() => {
- return dataLoadingStatus({ list: clentList.list, total: clentList.total, status: orderState.loading! })
- }, [clentList, orderState])
-
- const [clientObj, setclientObj] = useState({
- clientId: null,
- clientName: '',
- })
- // 上拉加载数据
- const pageNum = useRef({ size: search.size, page: search.page })
- // 输入了搜索关键字
- const getSearchData = useCallback((eq) => {
- pageNum.current.page = 1
- setClientlist(() => ({ list: [], total: 0 }))
- setSearch(e => ({ ...e, name_phone_or_sale_user: eq, size: 10 }))
- }, [])
-
- const router = useRouter()
-
- const getScrolltolower = useCallback(() => {
- if (clentList.list.length < clentList.total) {
- pageNum.current.page++
- const size = pageNum.current.size * pageNum.current.page
- setSearch(e => ({ ...e, size }))
- console.log(search, 11111)
- }
- }, [clentList])
-
- // 列表下拉刷新
- const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false)
- const getRefresherRefresh = async() => {
- pageNum.current.page = 1
- setRefresherTriggeredStatus(true)
- setSearch(val => ({ ...val, size: 10 }))
- }
- const getCuss = async() => {
- const res = await clitentFetch({ name_phone_or_sale_user: search.name_phone_or_sale_user === null ? '' : search.name_phone_or_sale_user, page: search.page, size: search.size })
- if (router?.params.clientId) {
- res.data.list.map((item) => {
- if (item.id == router?.params.clientId) {
- item.checked = true
- }
- else {
- item.checked = false
- }
- return item
- })
- }
- setClientlist(e => ({ ...e, list: res.data?.list, total: res.data?.total }))
- setRefresherTriggeredStatus(() => false)
- }
- useEffect(() => {
- if (search.name_phone_or_sale_user === '') {
- setSearch(e => ({ ...e, name_phone_or_sale_user: null }))
- }
- if (search.name_phone_or_sale_user !== '') { getCuss() }
- }, [search])
- // 选择客户
- const selectClient = (item) => {
- clentList.list.map((it) => {
- if (item.id === it.id) {
- it.checked = true
- }
- else {
- it.checked = false
- }
- return it
- })
- setclientObj(item)
- const pages = Taro.getCurrentPages() // 获取当前的页面栈
- const prevPage = pages[pages.length - 2]
- console.log('prevPage', prevPage)
- prevPage.setData({ // 设置上一个页面的值
- clientId: item.id,
- clientName: item.name,
- clientPhone: item.phone,
- })
- setClientlist(e => ({ ...e, list: clentList?.list, total: clentList?.total }))
- Taro.navigateBack({
- delta: 1,
- })
- }
- useEffect(() => {
- if (clientObj?.clientId !== null) {
- setclientObj(clientObj)
- }
- // else {
- // let pages = Taro.getCurrentPages(); // 获取当前的页面栈
- // let prevPage = pages[pages.length - 2];
- // prevPage.setData({ //设置上一个页面的值
- // clientId: '',
- // clientName: '',
- // });
- // }
- }, [clientObj])
- return (
-
-
-
-
-
-
-
-
-
- {
- clentList.list.map((item, index) => {
- return (
- { selectClient(item) }}>
-
- { item.name }
-
- {
- (item?.platform_source_name && item.platform_source !== 1)
- &&
- { item?.platform_source_name }
-
- }
- {item.phone}
- {item.sale_user_name}
-
- )
- })
- }
-
-
-
-
- )
-}
-
-export default CustomerPage
diff --git a/src/pages/delivery/components/DeliveryStatusList/index.module.scss b/src/pages/delivery/components/DeliveryStatusList/index.module.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/src/pages/delivery/components/DeliveryStatusList/index.tsx b/src/pages/delivery/components/DeliveryStatusList/index.tsx
deleted file mode 100644
index a5a1e17..0000000
--- a/src/pages/delivery/components/DeliveryStatusList/index.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import { FC, memo, useCallback, useEffect, useState } from 'react'
-import SegmentedControl from '@/components/SegmentedControl'
-import { EnumSaleorderStatus } from '@/api/index'
-
-interface PropsType {
- onChangeStatus?: (data: { id: number; name: string }) => void
-}
-
-const DeliveryStatusList = (props: PropsType) => {
- const { onChangeStatus } = props
- const { fetchData } = EnumSaleorderStatus()
- const [statusList, setStatusList] = useState([
- // {
- // id: -1,
- // name: '全部',
- // },
- ])
- const [defaultId, setDefaultId] = useState(0)
- // 请求
- const getDeliveryStatusList = async() => {
- const res = await fetchData()
- console.log(res.data.list)
- const list = res.data.list.filter((item) => {
- return item.id === 3 || item.id === 4 // 待发货 已完成
- })
- setStatusList(list)
- setDefaultId(list[0].id)
- }
-
- useEffect(() => {
- getDeliveryStatusList()
- }, [])
-
- // //状态改变
- const changeStatus = useCallback(
- (data: { id: number; name: string }) => {
- onChangeStatus && onChangeStatus({ id: data.id, name: data.name })
- },
- [onChangeStatus],
- )
- return
-}
-export default memo(DeliveryStatusList)
diff --git a/src/pages/delivery/components/Filter/index.module.scss b/src/pages/delivery/components/Filter/index.module.scss
deleted file mode 100644
index fc96a9e..0000000
--- a/src/pages/delivery/components/Filter/index.module.scss
+++ /dev/null
@@ -1,92 +0,0 @@
-.filterItem {
- margin: 24px 48px;
- &--title {
- font-size: 28px;
- font-weight: 550;
- line-height: 1.5;
- }
- &--wrapper {
- margin-top: 24px;
- display: grid;
- grid-gap: 16px 16px;
- }
-}
-.filter {
- &--time {
- grid-template-columns: 1fr 1fr 1fr 1fr;
- }
- &--inputBar {
- }
- &--type {
- grid-template-columns: 1fr 1fr;
- }
-}
-.filterTypeButton {
- padding: 0 24px;
- font-size: 28px;
-}
-.filterTypeText {
- color: #6e6e6e !important;
-}
-.filterTimeButton {
- grid-column-start: span 2;
-}
-.selected {
- background-color: #eaf2ff;
-}
-
-.filterButton {
- display: flex;
- flex-flow: row nowrap;
- align-items: center;
- justify-content: center;
- padding: 0 20px;
- box-sizing: border-box;
- border: 0 solid transparent;
- background-color: #f6f6f6;
- border-radius: 8px;
- font-size: 28px;
- height: 72px;
- &--text {
- color: #696969;
- display: flex;
- flex-flow: row nowrap;
- justify-content: center;
- align-items: center;
- font-weight: lighter;
- }
- &:hover {
- opacity: 0.7;
- }
- &--active {
- border: 1px solid $color_main;
- background-color: #eaf2ff;
- .filterButton--text {
- color: $color_main;
- font-weight: 550;
- }
- }
-}
-.filterController {
- margin-top: 60px;
- width: 100%;
- display: flex;
- flex-flow: row nowrap;
- align-items: center;
- justify-content: space-around;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- .btn {
- width: 40%;
- &:hover{
- filter: blur(.7);
- }
-
- }
- .rest_btn {
- font-size: 28px;
- }
- .verify_btn {
- font-size: 28px;
- }
-}
diff --git a/src/pages/delivery/components/Filter/index.tsx b/src/pages/delivery/components/Filter/index.tsx
deleted file mode 100644
index e998011..0000000
--- a/src/pages/delivery/components/Filter/index.tsx
+++ /dev/null
@@ -1,193 +0,0 @@
-import { View } from '@tarojs/components'
-import Taro from '@tarojs/taro'
-import classnames from 'classnames'
-import type { FC } from 'react'
-import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import dayjs from 'dayjs'
-import styles from './index.module.scss'
-import NormalButton from '@/components/normalButton'
-import Popup from '@/components/popup'
-import Search from '@/components/search'
-import IconFont from '@/components/iconfont/iconfont'
-import { EnumDeliveryNoticeTypeList } from '@/api/index'
-import { getFilterData } from '@/common/util'
-import { formatDateTime } from '@/common/format'
-
-interface ButtonPropsType {
- isActive: boolean
- onClick?: Function
- children?: React.ReactNode
- customClassName?: string
-}
-const FilterButton: FC = (props) => {
- const { onClick, children, isActive = false, customClassName } = props
- const handleClick = () => {
- onClick?.()
- }
- return (
-
- {children}
-
- )
-}
-interface SearchFilter {
- type?: number
- timeKey?: string
-}
-
-export interface SearchField extends Omit {
- date_min?: string
- date_max?: string
-}
-
-interface DeliveryPropsType {
- onSearchTime?: () => void
- onConfirm?: (searchField: SearchField, timeKey?: Pick['timeKey']) => void
- onCancal?: () => void
- onReset?: () => void
-}
-
-const DeliveryFilter = (props: DeliveryPropsType) => {
- const filterTimeOptions = {
- 0: {
- name: '不限',
- date_min: undefined,
- date_max: undefined,
- },
- 1: {
- name: '今天',
- date_min: `${dayjs(new Date()).add(0, 'day').format('YYYY-MM-DD')} 00:00:00`,
- date_max: `${dayjs(new Date()).add(1, 'day').format('YYYY-MM-DD')} 00:00:00`,
- },
- 2: {
- name: '昨日',
- date_min: `${dayjs(new Date()).add(-1, 'day').format('YYYY-MM-DD')} 00:00:00`,
- date_max: `${dayjs(new Date()).add(0, 'day').format('YYYY-MM-DD')} 00:00:00`,
- },
- 3: {
- name: '近7日',
- date_min: `${dayjs(new Date()).add(-7, 'day').format('YYYY-MM-DD')} 00:00:00`,
- date_max: `${dayjs(new Date()).add(0, 'day').format('YYYY-MM-DD')} 00:00:00`,
- },
- 4: {
- name: '近30日',
- date_min: `${dayjs(new Date()).add(-30, 'day').format('YYYY-MM-DD')} 00:00:00`,
- date_max: `${dayjs(new Date()).add(0, 'day').format('YYYY-MM-DD')} 00:00:00`,
- },
- 5: {
- name: '近90日',
- date_min: `${dayjs(new Date()).add(-90, 'day').format('YYYY-MM-DD')} 00:00:00`,
- date_max: `${dayjs(new Date()).add(0, 'day').format('YYYY-MM-DD')} 00:00:00`,
- },
- } as const
-
- const { onSearchTime, onConfirm, onCancal, onReset } = props
-
- const { fetchData, state } = EnumDeliveryNoticeTypeList()
-
- const [searchFilter, setSearchFilter] = useState({
- type: undefined,
- timeKey: '0',
- })
- const handleSelectedType = (type: string | number) => {
- console.log('type==>', type)
- if (typeof type === 'string' && type === 'default') {
- setSearchFilter(e => ({ ...e, type: undefined }))
- }
- else {
- setSearchFilter(e => ({ ...e, type: type as number }))
- }
- }
-
- const typeList = useMemo<{ id: number; name: string }[]>(() => {
- return state.data.list
- }, [state])
-
- const getEnumData = async() => {
- await fetchData()
- }
- useEffect(() => {
- if (!typeList?.length) {
- getEnumData()
- console.log('getEnumData')
- }
- }, [typeList])
- const [customTime, setCustomTime] = useState({
- date_min: undefined,
- date_max: undefined,
- })
-
- const handleSelectedTime = (timeOptionId) => {
- setSearchFilter(e => ({ ...e, timeKey: timeOptionId }))
- // 不是设置了自定义时间
- if (timeOptionId !== '6') {
- setCustomTime({
- date_min: filterTimeOptions[timeOptionId].date_min,
- date_max: filterTimeOptions[timeOptionId].date_max,
- })
- return
- }
- onSearchTime?.()
- }
-
- const handleReset = () => {
- setSearchFilter({ type: undefined, timeKey: '0' })
- onReset?.()
- }
- const handleConfirm = () => {
- const changedField = {
- type: searchFilter.type,
- date_min: customTime.date_min,
- date_max: customTime.date_max,
- }
- console.log('changedField==>', changedField)
- onConfirm?.(changedField, searchFilter.timeKey)
- }
-
- return (
- <>
-
- 发货类型
-
- handleSelectedType('default')}>
- 不限
-
- {!!typeList?.length
- && typeList?.map((item, key) => {
- return (
- handleSelectedType(item?.id)}>
- {item.name}
-
- )
- })}
-
-
-
-
- 查询日期
-
- {Object.entries(filterTimeOptions).map(([key, value], index) => {
- return (
- handleSelectedTime(key)}>
- {value.name}
-
- )
- })}
- handleSelectedTime('6')}>
- 自定义时间
-
-
-
-
-
- 重置
-
-
- 确认
-
-
- >
- )
-}
-
-export default memo(DeliveryFilter)
diff --git a/src/pages/delivery/components/ItemList1/index.module.scss b/src/pages/delivery/components/ItemList1/index.module.scss
deleted file mode 100644
index 500720c..0000000
--- a/src/pages/delivery/components/ItemList1/index.module.scss
+++ /dev/null
@@ -1,66 +0,0 @@
-.layoutBlock{
- margin: 20px;
- padding: 24px;
-}
-.topBar {
- font-size: 28px;
- &__orderNo {
- display: flex;
- flex-flow: row nowrap;
- justify-content: space-between;
- color: $color_font_one;
- .orderNo{
- font-weight: bold;
- }
- }
- &__orderType {
- color: #6e6e6e;
- font-weight: bold;
- }
- &__orderStatus {
- font-weight: bold;
- &--toBeAudited{
- color: #e42945;
- }
- &--finish{
- color: $color_main;
- }
- }
-}
-.content {
- &__row {
- display: flex;
- flex-flow: row nowrap;
- justify-content: space-between;
- margin: 16px 0;
- font-size: 28px;
- color: rgba($color: #000000, $alpha: 0.4);
- &__left {
- min-width: 140px;
- }
- &__right {
- @include common_ellipsis(2);
- }
- }
-}
-.bottomBar {
- display: flex;
- flex-flow: row nowrap;
- justify-content: flex-end;
- align-items: center;
- margin-top: 10px;
- &__button {
- margin: 0 24px;
- font-size: 28px;
- padding: 0 26px;
- }
- &__button:last-child {
- margin: 0;
- }
-}
-.bord {
- color: $color_font_one;
-}
-.tag{
- margin: 0 16px;
-}
diff --git a/src/pages/delivery/components/ItemList1/index.tsx b/src/pages/delivery/components/ItemList1/index.tsx
deleted file mode 100644
index 31fc1ea..0000000
--- a/src/pages/delivery/components/ItemList1/index.tsx
+++ /dev/null
@@ -1,137 +0,0 @@
-import { Text, View } from '@tarojs/components'
-import Taro from '@tarojs/taro'
-import type { FC } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-import LayoutBlock from '@/components/layoutBlock'
-import Divider from '@/components/Divider'
-import NormalButton from '@/components/normalButton'
-import { EnumSaleMode } from '@/common/Enumerate'
-import { formatDateTime, formatMeterDiv } from '@/common/format'
-import { goLink } from '@/common/common'
-// import { DeliveryNoticeOrderAudit } from '@/api/index'
-// import Taro from '@tarojs/taro'
-import SaleModeTag from '@/components/saleModeTag'
-import { TakeOutOfStorage } from '@/api/delivery'
-// import { alert } from '@/common/common'
-
-interface PropsType {
- itemData: Record
- onSuccess?: Function
-}
-
-const ItemList: FC = (props) => {
- const { itemData, onSuccess } = props
- // 查看详情
- const handleDetail = (e) => {
- e?.stopPropagation()
- goLink('/pages/deliveryDetail/index', {
- id: itemData.id,
- // order_no: itemData.order_no,
- })
- }
-
- // const {fetchData} = DeliveryNoticeOrderAudit()
-
- // // 确认审核
- // const handleAudit = (id: number) => {
- // if (itemData.delivery_appendix_url.length === 0 ) {
- // alert.error('请先上传附件')
- // return
- // }
- // Taro.showModal({
- // content: '确认要审核吗?',
- // confirmColor: '#337FFF',
- // success: async (res) => {
- // if (res.confirm) {
- // const res = await fetchData({ id })
- // if (res.success) {
- // Taro.showToast({ title: '审核成功', icon: 'success' })
- // onSuccess?.()
- // }else{
- // Taro.showToast({ title: '审核失败', icon: 'error' })
- // }
- // }
- // },
- // })
- // }
-
- const { fetchData } = TakeOutOfStorage()
-
- const handleTakeOutOfStorage = async(e) => {
- e.stopPropagation()
- const res = await fetchData({
- sale_order_id: itemData.sale_order_id,
- })
- if (res.success) {
- Taro.showToast({ title: '出仓成功', icon: 'success' })
- onSuccess?.()
- }
- else {
- Taro.showToast({ title: '出仓失败', icon: 'error' })
- }
- }
-
- return (
-
-
-
- 单号:{itemData?.order_no}
- {itemData?.status === 1 && 已审核}
- {itemData?.status === 0 && 待审核}
-
- {itemData?.type_name}
-
-
-
-
- 货品信息:
-
-
- {itemData.delivery_product_nums}种面料,{itemData.delivery_product_color_nums}种颜色,共
- {itemData?.sale_mode === EnumSaleMode.Bulk ? `${itemData?.delivery_roll}条` : `${formatMeterDiv(itemData?.delivery_length)}米`}
-
-
-
- 发货地址:
- {itemData?.delivery_address || '空'}
-
-
- 创建时间:
- {formatDateTime(itemData?.create_time) || '空'}
-
-
-
- {
- !itemData?.is_outbound &&
- 确认出仓
-
- }
- {/* 已完成不需要显示 */}
- {
- itemData?.status !== 1 &&
- 确认送达
-
- }
- {/* {itemData?.status === 0 && (
- handleAudit(itemData?.id)}>
- 确认审核
-
- )} */}
-
-
- )
-}
-export default ItemList
diff --git a/src/pages/delivery/index.config.ts b/src/pages/delivery/index.config.ts
deleted file mode 100644
index 0bb51cc..0000000
--- a/src/pages/delivery/index.config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export default {
- navigationBarTitleText: '发货列表',
-}
diff --git a/src/pages/delivery/index.module.scss b/src/pages/delivery/index.module.scss
deleted file mode 100644
index 66eaf73..0000000
--- a/src/pages/delivery/index.module.scss
+++ /dev/null
@@ -1,47 +0,0 @@
-page {
- background: #f7f7f7;
- height: 100%;
- display: flex;
- flex-flow: column nowrap;
-}
-
-.delivery {
- position: relative;
- display: flex;
- flex-flow: column nowrap;
- overflow: hidden;
- padding-bottom: env(safe-area-inset-bottom);
- .searchBox {
- display: flex;
- align-items: center;
- background: #ffffff;
- padding: 8px 24px;
- flex: none;
- }
-
- .listBox {
- flex: 1 1 auto;
- background-color: #f7f7f7;
- overflow: hidden;
- height: 100%;
- &--total {
- display: block;
- margin-top: 20px;
- padding: 0 24px;
- font-size: 24px;
- color: #9d9d9d;
- }
- }
-}
-.scanHandler {
- width: 40px;
- height: 40px;
-}
-
-.icon__filter {
- padding: 0 20px;
- padding-right: 10px;
-}
-.active {
- color: #337fff;
-}
diff --git a/src/pages/delivery/index.tsx b/src/pages/delivery/index.tsx
deleted file mode 100644
index 40782fb..0000000
--- a/src/pages/delivery/index.tsx
+++ /dev/null
@@ -1,233 +0,0 @@
-import { Text, View } from '@tarojs/components'
-import Taro, { useDidShow, useRouter } from '@tarojs/taro'
-import type { FC } from 'react'
-import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import classNames from 'classnames'
-import styles from './index.module.scss'
-import ItemList from './components/ItemList1'
-import DeliveryStatusList from './components/DeliveryStatusList'
-import type { SearchField } from './components/Filter'
-import DeliveryFilter from './components/Filter'
-import Search from '@/components/search'
-import { DeliverNoticeOrderList, EnumSaleorderStatus } from '@/api/index'
-import InfiniteScroll from '@/components/infiniteScroll'
-import { dataLoadingStatus, debounce, getFilterData } from '@/common/util'
-import IconText from '@/components/iconText'
-import IconFont from '@/components/iconfont/iconfont'
-import Popup from '@/components/popup'
-import TimePickerPopup from '@/components/timePickerPopup'
-import { goLink } from '@/common/common'
-
-interface SearchData {
- delivery_notice_order_no?: string // 发货单号
- delivery_notice_order_status?: number | string // 发货状态
- date_min?: string // 开始时间
- date_max?: string // 结束时间
- type?: number // 发货类型
- page: number
- size: number
-}
-
-const defaultSearchFields = {
- delivery_notice_order_status: 0, // 待发货
- page: 1,
- size: 10,
-}
-
-// 发货列表
-const Delivery: FC = () => {
- const [search, setSearch] = useState(defaultSearchFields)
- const [deliveryOrderList, setDeliveryOrderList] = useState<{ list: any[]; total: number }>({ list: [], total: 0 })
-
- const isActive = useMemo(() => {
- console.log('search', search)
- if (search.type != null || search.date_max != null || search.date_min != null) {
- return true
- }
- else {
- return false
- }
- }, [search])
-
- const { fetchData: FetchDeliveryOrderList, state: orderState } = DeliverNoticeOrderList()
- // 数据加载状态
- const statusMore = useMemo(() => {
- return dataLoadingStatus({ list: deliveryOrderList.list, total: deliveryOrderList.total, status: orderState.loading! })
- }, [deliveryOrderList, orderState])
-
- // 输入搜索关键字
- const getSearchData = useCallback(debounce((searchValue: string) => {
- setSearch(prevProps => ({ ...prevProps, delivery_notice_order_no: searchValue }))
- console.log('searchValue==>', searchValue)
- }, 300), [])
-
- // 上拉加载数据
- const pageNum = useRef({ size: search.size, page: search.page })
-
- const getScrollToLower = useCallback(() => {
- if (deliveryOrderList.list.length < deliveryOrderList.total) {
- pageNum.current.page++
- const size = pageNum.current.size * pageNum.current.page
- setSearch(e => ({ ...e, size }))
- console.log(search, 11111)
- }
- }, [deliveryOrderList])
-
- // 列表下拉刷新
- const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false)
-
- const getRefresherRefresh = async() => {
- pageNum.current.page = 1
- setRefresherTriggeredStatus(true)
- setSearch(val => ({ ...val, size: 10 }))
- }
- const getData = async() => {
- const res = await FetchDeliveryOrderList({ ...getFilterData(search) })
-
- setDeliveryOrderList(e => ({ ...e, list: res.data?.list, total: res.data?.total }))
- if (isScan.current) {
- if (res.data?.list?.length === 1) {
- goLink('/pages/deliveryDetail/index', {
- id: res.data?.list[0].id,
- order_no: res.data?.list[0].order_no,
- })
- }
- isScan.current = false
- }
- setRefresherTriggeredStatus(() => false)
- }
-
- const [currentStatus, setCurrentStatus] = useState('待发货')
-
- const handleChangeStatus = ({ id: statusId, name: statusName }) => {
- let fuckingBadCodeId: string | number = 0
- if (statusId === 3) {
- fuckingBadCodeId = 0
- }
- else if (statusId === 4) {
- fuckingBadCodeId = '1,2'
- }
- setCurrentStatus(statusName)
- console.log('handleChangeStatus')
- setSearch(e => ({ ...e, delivery_notice_order_status: fuckingBadCodeId }))
- }
-
- const handleAuditSuccess = () => {
- getData()
- }
-
- const [showFilter, setShowFilter] = useState(false)
- // 筛选列表
- const onShowFilter = () => {
- setShowFilter(true)
- }
- // 点击关闭筛选列表框
- const handlePopupClose = () => {
- setShowFilter(false)
- }
-
- // 展示时间筛选
- const [showTime, setShowTime] = useState(false)
-
- // 点击关闭时间筛选
- const handClose = () => {
- setShowTime(false)
- }
- const [start, setStart] = useState(new Date().toLocaleDateString())
- const [end, setEnd] = useState('')
- // 选择时间
- const handTime = (event) => {
- console.log(event?.value, 'event?.value?.start')
- setStart(event?.value?.start)
- setEnd(event?.value?.end)
- setShowTime(false)
- console.log(search, 8888)
- }
- // 显示时间选择器
- const handleSearchTime = () => {
- setShowTime(true)
- }
- // 筛选框点击确认
- const handleConfirm = (changedFields: SearchField, timeKey) => {
- console.log('changedFields==>changedFields', changedFields)
- // 自定义时间
- if (timeKey === '6') {
- setSearch(prevProps => ({ ...prevProps, ...changedFields, date_min: start, date_max: end }))
- }
- else {
- setSearch(prevProps => ({ ...prevProps, ...changedFields }))
- }
- handlePopupClose()
- }
- // 筛选框点击重置
- const handleReset = () => {
- setSearch(defaultSearchFields)
- }
-
- const isScan = useRef(false)
-
- const scanIcon = () => {
- // 扫描
- const handleScan = () => {
- Taro.scanCode({
- success(res) {
- console.log(res, '22222')
- isScan.current = true
- setSearch(e => ({
- page: e.page,
- size: e.size,
- delivery_notice_order_no: res.result,
- }))
- },
- fail(res) {
- console.log(res)
- },
- })
- }
- return (
-
-
-
- )
- }
- useEffect(() => {
- getData()
- }, [search])
-
- return (
-
-
-
-
-
-
-
-
- {/* 状态栏 */}
-
-
-
-
-
- {currentStatus}共 {deliveryOrderList.total} 单
-
- {deliveryOrderList.list.map((item) => {
- return
- })}
-
-
-
-
-
- handTime(e)}>
-
- )
-}
-
-export default Delivery
diff --git a/src/pages/deliveryDetail/index.config.ts b/src/pages/deliveryDetail/index.config.ts
deleted file mode 100644
index c0de240..0000000
--- a/src/pages/deliveryDetail/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- enablePullDownRefresh: true,
- navigationBarTitleText: '销售发货',
-}
diff --git a/src/pages/deliveryDetail/index.module.scss b/src/pages/deliveryDetail/index.module.scss
deleted file mode 100644
index 78a8a3f..0000000
--- a/src/pages/deliveryDetail/index.module.scss
+++ /dev/null
@@ -1,111 +0,0 @@
-page {
- display: flex;
- flex-flow: column nowrap;
- height: 100%;
-}
-.deliveryDetail {
- display: flex;
- flex-flow: column nowrap;
- height: 100%;
- .content {
- padding-top: 24px;
- flex: 1 1 auto;
- overflow: scroll;
- .detailTop {
- display: flex;
- flex-flow: row nowrap;
- justify-content: space-between;
- align-items: center;
- }
- }
- .bottomBar {
- flex: none;
- margin: 0 24px;
- display: flex;
- flex-flow: row nowrap;
- justify-content: space-between;
- align-items: center;
- padding-top: 24px;
- padding-bottom: calc(20px + constant(safe-area-inset-bottom));
- padding-bottom: calc(20px + env(safe-area-inset-bottom));
- }
-}
-.detailInfo {
- .detailInfoItem {
- &--title {
- display: flex;
- flex-flow: row nowrap;
- justify-content: space-between;
- align-items: center;
- font-size: 28px;
- font-weight: bold;
- color: #424242;
- padding: 10px 0;
- }
- &--detail {
- display: flex;
- flex-flow: column nowrap;
-
- &--row{
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 10px 0;
- font-size: 28px;
- color: #6e6e6e;
- }
- &--name{
- flex: 2;
- }
- &--count{
- flex: 1;
- }
- &--weight{
- flex: 1;
- text-align: right;
- }
- }
- }
-}
-.orderInfoTop{
- font-size: 28px;
- color: $color_font_one;
- font-weight: 550;
-}
-
-.orderNo {
- font-size: 28px;
- font-weight: 550;
- color: #424242;
-}
-.status {
- font-size: 28px;
- &--toBeAudit {
- color: $color_danger;
- font-weight: bold;
- }
- &--audited {
- color: $color_main;
- font-weight: bold;
- }
-}
-
-.divider {
- margin: 20px 0 10px 0;
-}
-.total {
- margin-top: 24px;
- padding: 15px 24px;
- font-size: 24px;
- line-height: 30px;
- font-weight: 600;
- color: #f79b31;
- background: #fef9f4;
- border-radius: 8px;
- display: flex;
- .totalContent{
- flex: 1 1 auto;
- display: inline-block;
- text-align: right;
- }
-}
diff --git a/src/pages/deliveryDetail/index.tsx b/src/pages/deliveryDetail/index.tsx
deleted file mode 100644
index 251c86c..0000000
--- a/src/pages/deliveryDetail/index.tsx
+++ /dev/null
@@ -1,278 +0,0 @@
-import { Text, View } from '@tarojs/components'
-import Taro, { usePullDownRefresh, useRouter } from '@tarojs/taro'
-import type { FC } from 'react'
-import { useCallback, useLayoutEffect, useMemo, useState } from 'react'
-import styles from './index.module.scss'
-import { DeliverNoticeOrder, DeliveryNoticeOrderAudit, DeliveryNoticeOrderUpload } from '@/api'
-import { formatDateTime, formatMeterDiv, formatWeightDiv } from '@/common/format'
-import Cell from '@/components/cell'
-import Divider from '@/components/Divider'
-import LayoutBlock from '@/components/layoutBlock'
-import NormalButton from '@/components/normalButton'
-import SaleModeTag from '@/components/saleModeTag'
-import UploadImage from '@/components/uploadImage'
-import { alert } from '@/common/common'
-import { TakeOutOfStorage } from '@/api/delivery'
-import { EnumSaleMode } from '@/common/Enumerate'
-
-const DeliveryDetail: FC = () => {
- usePullDownRefresh(() => {
- getData()
- })
-
- const router = useRouter()
-
- const { fetchData } = DeliverNoticeOrder()
- const { fetchData: takeOut } = TakeOutOfStorage()
-
- const [detailInfo, setDetailInfo] = useState>({})
-
- // const [isPending, startTransition] = useTransition()
-
- const getData = async() => {
- const { id } = router.params
- const res = await fetchData({
- id,
- })
- console.log('res==>', res.data)
- // startTransition(() => {
- setDetailInfo(res.data)
- // })
- Taro.stopPullDownRefresh()
- }
-
- useLayoutEffect(() => {
- getData()
- }, [])
-
- const { fetchData: uploadData } = DeliveryNoticeOrderUpload()
-
- const { fetchData: FetchAudit } = DeliveryNoticeOrderAudit()
-
- // const DetailItem = useMemo(() => {
- // const element
- // = !!detailInfo?.weight_list?.length
- // && detailInfo?.weight_list.map((weightItem, index) => {
- // return (
- //
- //
- //
- //
- //
- //
- // {weightItem.product_code} {weightItem.product_name}
- //
- //
- //
- // 共 {weightItem?.sale_mode === 0 ? `${weightItem.roll} 条` : `${formatMeterDiv(weightItem?.length || 0)} 米`}
- //
- //
- //
- //
- // {weightItem.product_color_code} {weightItem.product_color_name}
- //
- //
- // x{weightItem?.sale_mode === 0 ? `${weightItem.roll} 条` : `${formatMeterDiv(weightItem?.length || 0)} 米`}
- //
- // {formatWeightDiv(weightItem.weight)}kg
- //
- //
- //
- //
- // )
- // })
- // return <>{element}>
- // }, [detailInfo])
-
- const [readyToUploadList, setReadyToUploadList] = useState([])
-
- const handleUploadChange = (imageList: string[]) => {
- console.log('imageList===>', imageList)
- setReadyToUploadList([...imageList])
- }
- // 上传附件
- const handleUploadPic = useCallback(async() => {
- if (!readyToUploadList.length) {
- return Promise.reject(new Error('请先上传附件'))
- }
- console.log('readyToUploadList:::', readyToUploadList)
- const res = await uploadData({
- id: Number(router.params.id),
- delivery_appendix: readyToUploadList,
- })
- if (res.success) {
- // alert.success('上传成功')
- // getData()
- return Promise.resolve()
- }
- else {
- return Promise.reject(new Error('上传失败'))
- }
- }, [readyToUploadList])
-
- // 审核
- const handleAudit = useCallback(() => {
- // if (detailInfo?.delivery_appendix_url?.length === 0) {
- // alert.error('请先上传附件')
- // return
- // }
- Taro.showModal({
- confirmColor: '#337FFF',
- title: '确定审核?',
- async success(res) {
- if (res.confirm) {
- try {
- await handleUploadPic()
- }
- catch (e) {
- e.name = ''
- console.log('e', e.toString())
- alert.error(e.toString())
- return
- }
- const res = await FetchAudit({ id: Number(router.params.id) })
- if (res.success) {
- alert.success('审核成功')
- getData()
- }
- else {
- alert.none(res.msg)
- }
- }
- else if (res.cancel) {
- console.log('用户点击取消')
- }
- },
- })
- }, [readyToUploadList])
-
- const handleTakeOutOfStorage = async() => {
- const res = await takeOut({
- sale_order_id: detailInfo.sale_order_id,
- })
- if (res.success) {
- Taro.showToast({ title: '出仓成功', icon: 'success' })
- getData()
- }
- else {
- Taro.showToast({ title: '出仓失败', icon: 'error' })
- }
- }
-
- const BottomBar = () => {
- return (
-
- {
- !detailInfo?.is_outbound &&
- 确认出仓
-
- }
-
- 确认送达
-
-
- )
- }
-
- const groups = useMemo(() => {
- const temp: Record = {}
- detailInfo?.weight_list?.forEach((weightItem) => {
- const name = `${weightItem.product_code} ${weightItem.product_name}`
- temp.hasOwnProperty(name) ? temp[name].push(weightItem) : temp[name] = [weightItem]
- })
- return temp
- }, [detailInfo])
-
- const formatUnit = (saleMode: EnumSaleMode) => {
- return saleMode === EnumSaleMode.Bulk ? '条' : '米'
- }
-
- return (
-
-
-
-
- 发货单号:{detailInfo?.order_no}
- {detailInfo?.status === 0 ? 待发货 : 已完成}
-
- {
- Object.entries(groups).map(([name, group], index) => {
- let total = 0
- if (group[0]?.sale_mode === EnumSaleMode.Bulk) {
- total = group.reduce((acc, cur) => acc + cur.roll, 0)
- }
- else {
- total = group.reduce((acc, cur) => acc + formatMeterDiv(cur.length), 0)
- }
- return (
-
-
-
-
-
-
- {name}
-
-
-
- 共 {total} {formatUnit(group[0]?.sale_mode)}
-
-
- {
- group?.map((weightItem, key) => {
- return (
-
-
- {weightItem.product_color_code} {weightItem.product_color_name}
-
-
- x{weightItem?.sale_mode === 0 ? `${weightItem.roll} 条` : `${formatMeterDiv(weightItem?.length || 0)} 米`}
-
- {formatWeightDiv(weightItem.weight)}kg
-
- )
- })
- }
-
-
-
- )
- })
- }
-
- 汇总:
-
- 共{detailInfo?.delivery_product_nums || 0}种面料,{detailInfo?.delivery_product_color_nums || 0}种颜色,共
- {detailInfo?.sale_mode === 0 ? `${detailInfo?.total_roll}条` : `${formatMeterDiv(detailInfo?.total_length).toLocaleString()}米`}
- ,重量{formatWeightDiv(detailInfo?.total_weight).toLocaleString()}kg
-
-
-
-
- 订单信息
-
-
- |
- |
- |
- |
-
-
-
- 附件
-
-
-
-
- {detailInfo?.status === 0 && BottomBar()}
-
- )
-}
-export default DeliveryDetail
diff --git a/src/pages/getColorCard/addColorCard/components/colorCardItem/index.module.scss b/src/pages/getColorCard/addColorCard/components/colorCardItem/index.module.scss
deleted file mode 100644
index b4c9cc1..0000000
--- a/src/pages/getColorCard/addColorCard/components/colorCardItem/index.module.scss
+++ /dev/null
@@ -1,39 +0,0 @@
-.colorCardBottom {
- width: 100%;
- display: flex;
- flex-flow: row nowrap;
- justify-content: space-between;
- overflow: hidden;
- margin-bottom: 24px;
- .leftCont {
- width: 134px;
- height: 134px;
- border-radius: 8px;
- margin-right: 24px;
- }
- .rightCont {
- flex: 1 1 auto;
- overflow: hidden;
- display: flex;
- flex-flow: column nowrap;
- justify-content: space-between;
- &__top {
- font-size: 28px;
- @include common_ellipsis(1);
- }
- &__bottom {
- display: flex;
- flex-flow: row nowrap;
- justify-content: space-between;
- width: 100%;
- align-items: flex-end;
- }
- &__left {
- flex: 1 1 auto;
- overflow: hidden;
- }
- &__right {
- width: 35%;
- }
- }
-}
diff --git a/src/pages/getColorCard/addColorCard/components/colorCardItem/index.tsx b/src/pages/getColorCard/addColorCard/components/colorCardItem/index.tsx
deleted file mode 100644
index 7e9e3d9..0000000
--- a/src/pages/getColorCard/addColorCard/components/colorCardItem/index.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import { View } from '@tarojs/components'
-import { useCallback } from 'react'
-import styles from './index.module.scss'
-import LabAndImg from '@/components/LabAndImg'
-import Tag from '@/components/tag'
-import { formatRemoveHashTag } from '@/common/format'
-import Counter from '@/components/counter'
-import Divider from '@/components/Divider'
-
-interface PropsType {
- item: any
- onChangeCounter?: (value: number, id: number) => void
-}
-
-const ColorCardItem = (props: PropsType) => {
- const { item, onChangeCounter } = props
- const labAndImgObj = useCallback((item) => {
- return { lab: item?.lab, rgb: item?.rgb, texture_url: item?.texture_url }
- }, [])
-
- const handleCountChange = (value: number) => {
- onChangeCounter?.(value, item.id)
- }
-
- return
-
-
-
-
-
-
-
- {item.color_card_name}
-
-
-
- {
- item.affiliation_product.map((product_color, index) => {
- return {formatRemoveHashTag(product_color.code)}
- })
- }
-
-
-
-
-
-
-
-
-}
-export default ColorCardItem
diff --git a/src/pages/getColorCard/addColorCard/index.config.ts b/src/pages/getColorCard/addColorCard/index.config.ts
deleted file mode 100644
index c6c6fc4..0000000
--- a/src/pages/getColorCard/addColorCard/index.config.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export default {
- navigationBarTitleText: '领取色卡',
- disableSwipeBack: true,
- navigationStyle: 'custom',
-}
diff --git a/src/pages/getColorCard/addColorCard/index.module.scss b/src/pages/getColorCard/addColorCard/index.module.scss
deleted file mode 100644
index 2771112..0000000
--- a/src/pages/getColorCard/addColorCard/index.module.scss
+++ /dev/null
@@ -1,135 +0,0 @@
-page {
- background: #f7f7f7;
- height: 100%;
- display: flex;
- flex-flow: column nowrap;
-}
-.backIcon {
- transform: rotate(180deg);
-}
-.layoutBlock {
- padding: 24px 34px;
-}
-.main {
- background-color: $color_bg_one;
- height: 100%;
- display: flex;
- flex-flow: column nowrap;
- overflow: hidden;
-}
-.context {
- flex: 1 1 auto;
- height: 100%;
- overflow-y: scroll;
-}
-.addButton {
- margin-left: 24px;
- margin-right: 24px;
- margin-top: 24px;
-}
-.customerTop {
- color: #333333;
- font-size: 28px;
-}
-.customerBottom {
- display: flex;
- flex-flow: row nowrap;
- justify-content: space-between;
- color: #9b9b9b;
- font-size: 28px;
-}
-
-.colorCardTop {
- font-size: 28px;
-}
-.colorCardBottom {
- width: 100%;
- display: flex;
- flex-flow: row nowrap;
- justify-content: space-between;
- overflow: hidden;
- margin-bottom: 24px;
- .leftCont {
- width: 134px;
- height: 134px;
- border-radius: 8px;
- margin-right: 24px;
- }
- .rightCont {
- flex: 1 1 auto;
- overflow: hidden;
- display: flex;
- flex-flow: column nowrap;
- justify-content: space-between;
- &__top {
- font-size: 28px;
- @include common_ellipsis(1);
- }
- &__bottom {
- display: flex;
- flex-flow: row nowrap;
- justify-content: space-between;
- width: 100%;
- align-items: flex-end;
- }
- &__left {
- flex: 1 1 auto;
- overflow: hidden;
- }
- &__right {
- width: 30%;
- }
- }
-}
-.paymentMethod {
- text-align: right;
- font-size: 28px;
- color: #f64861;
-}
-
-.remarkTop {
- display: flex;
- justify-content: space-between;
- .remarkTitle {
- font-size: 28px;
- font-weight: 500;
- color: #393939;
- }
- .remarkTag {
- display: flex;
- flex-flow: row nowrap;
- font-size: 24px;
- color: #626262;
- }
-}
-
-.remarkBottom {
- .remarkContent {
- font-size: 28px;
- color: #999999;
- }
-}
-
-.bottomBar {
- .bottomTotal {
- color: #aeaeae;
- font-size: 24px;
- }
- position: relative;
- z-index: 99;
- box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1), 0 -2px 4px -2px rgb(0 0 0 / 0.1);
- flex: none;
- display: flex;
- flex-flow: row nowrap;
- justify-content: space-between;
- align-items: center;
- padding-left: 20px;
- padding-right: 20px;
- padding-top: 24px;
- background-color: white;
- padding-bottom: calc(20px + constant(safe-area-inset-bottom));
- padding-bottom: calc(20px + env(safe-area-inset-bottom));
-}
-.bottomBar__button {
- font-size: 28px;
-}
diff --git a/src/pages/getColorCard/addColorCard/index.tsx b/src/pages/getColorCard/addColorCard/index.tsx
deleted file mode 100644
index a3deb7f..0000000
--- a/src/pages/getColorCard/addColorCard/index.tsx
+++ /dev/null
@@ -1,391 +0,0 @@
-import { Text, View } from '@tarojs/components'
-import Taro, { useDidShow, useUnload } from '@tarojs/taro'
-import { useCallback, useEffect, useRef, useState } from 'react'
-import styles from './index.module.scss'
-import ColorCardItem from './components/colorCardItem'
-import LayoutBlock from '@/components/layoutBlock'
-import NormalButton from '@/components/normalButton'
-import Divider from '@/components/Divider'
-import IconFont from '@/components/iconfont/iconfont'
-import { alert, goLink } from '@/common/common'
-import { ClientListApi } from '@/api/order'
-import AddressDetailBox from '@/pages/orderDetails/components/addressDetailBox'
-import Popup from '@/components/popup'
-import Remark from '@/pages/orderDetails/components/remark'
-import { SubmitColorCardOrder } from '@/api/colorCard'
-import NavBar from '@/pages/order/components/NavBar'
-import { MpPurchaserAddressList } from '@/api/addressList'
-import { debounce } from '@/common/util'
-
-const AddColorCard = () => {
- // 获取选择的客户
- const pages = Taro.getCurrentPages()
- const currPage = pages[pages.length - 1] // 获取当前页面
- const [addressInfo, setAddressInfo] = useState({})
-
- // 获取客户
- const [clientList, setClientList] = useState([])
- const { fetchData: fetchClientData } = ClientListApi()
-
- const [order, setOrder] = useState([])
- const orderRef = useRef(order)
- orderRef.current = order
- console.log('AddColorCard rerender', order)
-
- useDidShow(() => {
- const colorCardCache = Taro.getStorageSync('colorCardCache')
- if (colorCardCache) {
- console.log('colorCardCache', JSON.parse(colorCardCache))
- setOrder(JSON.parse(colorCardCache))
- }
- })
-
- const [clientInfo, setClientInfo] = useState({
- clientId: -1,
- clientName: '',
- clientPhone: '',
- })
-
- const getClient = async() => {
- const res = await fetchClientData({
- page: 1, size: 10,
- })
- if (!res.success) {
- return alert.error(res.msg)
- }
- currPage.data.clientId = res.data.list.length > 0 ? res.data.list[0]?.id : -1
- currPage.data.clientName = res.data.list.length > 0 ? res.data.list[0]?.name : ''
- currPage.data.clientPhone = res.data.list.length > 0 ? res.data.list[0]?.phone : ''
- const {
- clientId,
- clientName,
- clientPhone,
- } = currPage.data
- setClientInfo({
- clientId,
- clientName,
- clientPhone,
- })
- setClientList([...res.data.list])
- }
-
- useEffect(() => {
- getClient()
- }, [])
-
- useUnload(() => {
- Taro.removeStorageSync('colorCardCache')
- })
-
- // 选择客户
- const handleSelectCustomer = () => {
- goLink(`/pages/customerPage/index?clientId=${clientInfo?.clientId}`)
- }
- // 添加色卡
- const handleAddColorCard = () => {
- Taro.setStorage({
- key: 'colorCardCache',
- data: JSON.stringify(order),
- success: () => {
- goLink('/pages/getColorCard/colorCardList/index', { isGoBack: true })
- },
- })
- // Taro.setStorageSync('colorCardCache', JSON.stringify(order))
- }
-
- const { fetchData, state } = SubmitColorCardOrder()
- // 提交订单
- const handleSubmitOrder = debounce(async() => {
- if (!addressInfo.address_id) {
- return alert.none('请选择地址')
- }
- if (!clientInfo.clientId) {
- return alert.none('请选择客户')
- }
- if (order.length === 0) { return alert.none('请选择色卡') }
-
- // 请求数据
- const res = await fetchData({
- address_id: addressInfo.address_id,
- color_card_infos: order.map(item => ({ id: item.id, count: item.count || 1 })),
- purchaser_id: clientInfo.clientId,
- remark,
- })
- if (res.success) {
- Taro.showToast({
- title: '提交成功',
- icon: 'success',
- duration: 2000,
- })
- Taro.removeStorageSync('colorCardCache')
- goLink('/pages/getColorCard/colorCardDetail/index', { id: res.data.id }, 'redirectTo')
- }
- }, 300)
-
- const deleteColorCard = (id) => {
- setOrder((prev) => {
- return prev.filter(item => item.id !== id)
- })
- Taro.setStorageSync('colorCardCache', JSON.stringify(orderRef.current.filter(item => item.id !== id)))
- }
-
- const handleCountChange = (value: number, id: number) => {
- console.log('value', value, orderRef.current)
- if (orderRef.current.length === 1 && value === 0) {
- return alert.none('最后一个色卡不能删除')
- }
- if (value === 0) {
- Taro.showModal({
- content: '确认删除所选色卡?',
- confirmText: '删除',
- confirmColor: '#337fff',
- success: ({ confirm }) => {
- if (confirm) {
- deleteColorCard(id)
- }
- },
- })
- return
- }
- setOrder((prev) => {
- const newOlder = prev.map((item) => {
- if (item.id === id) {
- item.count = value
- }
- return item
- })
- Taro.setStorageSync('colorCardCache', JSON.stringify(newOlder))
- return newOlder
- })
- }
-
- const handSelect = () => {
- goLink(`/pages/addressManager/index?purchaser_id=${clientInfo.clientId}`)
- }
- // 接受选择客户页面传递过来的数据
- useDidShow(() => {
- // 判断是否有跳转选择客户
- if (currPage.data?.clientId && currPage.data?.clientId !== '') {
- setClientInfo({
- clientId: currPage.data?.clientId,
- clientName: currPage.data?.clientName,
- clientPhone: currPage.data?.clientPhone,
- })
- // 当前客户不是已选客户 重新获取默认地址
- console.log(clientInfo.clientId, currPage.data?.clientId)
- if (clientInfo.clientId !== currPage.data?.clientId) {
- getDefaultAddressList(currPage.data?.clientId)
- }
- }
- // 默认客户
- if (currPage.data?.clientId == null) {
- setClientInfo(() => {
- return {
- clientId: clientList.length > 0 ? clientList[0]?.id : -1,
- clientName: clientList.length > 0 ? clientList[0]?.name : '',
- clientPhone: clientList.length > 0 ? clientList[0]?.phone : '',
- }
- })
- if (clientList.length > 0) {
- getDefaultAddressList(clientList[0]?.id)
- }
- }
- })
-
- const initAddressInfo = () => {
- setAddressInfo(val => ({
- ...val,
- province_name: '',
- address_id: '',
- city_name: '',
- address_detail: '',
- district_name: '',
- target_user_name: '',
- purchaser_phone: '',
- }))
- }
-
- useDidShow(() => {
- // 获取选择的地址
- console.log('addressObj', currPage.data?.addressObj, clientInfo.clientId, currPage.data?.clientId)
- if (!currPage.data?.addressObj) { return initAddressInfo() }
- const {
- purchaser_id,
- province_name,
- id,
- city_name,
- address_detail,
- district_name,
- name,
- phone,
- } = currPage.data?.addressObj
- if (purchaser_id === currPage.data?.clientId) {
- setAddressInfo(val => ({
- ...val,
- province_name: province_name || '',
- address_id: id || '',
- city_name: city_name || '',
- address_detail: address_detail || '',
- district_name: district_name || '',
- target_user_name: name || '',
- purchaser_phone: phone || '',
- }))
- }
- else {
- initAddressInfo()
- }
- const selectId = id
- const obj = currPage?.data?.ids?.filter((item) => { return item == selectId })
- console.log('ids', currPage?.data?.ids)
- if (currPage?.data?.ids && obj.length === 0) {
- initAddressInfo()
- }
- })
-
- // 备注操作
- const [showDesc, setShowDesc] = useState(false)
- const [remark, setRemark] = useState('')
- const handleShowDesc = () => {
- setShowDesc(true)
- }
-
- const getRemark = useCallback((value: string) => {
- setShowDesc(false)
- console.log('remark', value)
- setRemark(value)
- }, [])
-
- const onClickBack = () => {
- Taro.showModal({
- content: '返回后页面数据将不回保留,确认返回?',
- confirmColor: '#4a8dff',
- success: ({ confirm }) => {
- if (confirm) {
- Taro.navigateBack({
- delta: 1,
- })
- }
- },
- })
- }
-
- const { fetchData: addressListApi } = MpPurchaserAddressList()
- // 获取默认地址
- const getDefaultAddressList = async(purchaser_id: number) => {
- const res = await addressListApi({ purchaser_id })
- if (res.success) {
- const { list } = res.data
- let defaultAddress = list?.find((item) => { return item.is_default })
- if (!defaultAddress) {
- defaultAddress = list?.[0]
- }
- setAddressInfo(val => ({
- ...val,
- province_name: defaultAddress?.province_name || '',
- address_id: defaultAddress?.id || '',
- city_name: defaultAddress?.city_name || '',
- address_detail: defaultAddress?.address_detail || '',
- district_name: defaultAddress?.district_name || '',
- target_user_name: defaultAddress?.name || '',
- purchaser_phone: defaultAddress?.phone || '',
- }))
- currPage.data.addressObj = defaultAddress
- }
- }
-
- return
-
-
-
- } title="领取色卡"
- >
-
- {/* 客户信息 */}
-
-
- 客户信息
-
-
-
- {
- clientInfo.clientId !== -1
- ? (<>
-
- {clientInfo.clientName}
-
-
- {clientInfo.clientPhone}
-
- >
- )
- : 选择领取客户
- }
-
-
-
- {
- clientInfo.clientId !== -1 && }
- >
- }
-
- 添加色卡
- {/* 色卡信息 */}
-
- 色卡信息
-
- {
- order.map((item) => {
- return (
-
- )
- })
- }
- 快递到付
-
- {/* 备注信息 */}
-
-
- 备注信息
-
- 填写/修改备注
-
-
-
-
-
- { remark || '尚未备注信息' }
-
-
-
-
-
-
- 当前共 {order.length} 种色卡,共 {order.reduce((total, curr) => total + (curr.count || 1), 0)} 本
-
-
- 提交订单
-
-
-
- setShowDesc(false)}>
- {
- showDesc &&
- }
-
-