From 8bea17629266e55176833c1ddc84467332afd94c Mon Sep 17 00:00:00 2001 From: xuan Date: Fri, 24 Feb 2023 17:33:01 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(ID1001328):=20=E3=80=90?= =?UTF-8?q?=E5=86=85=E9=83=A8=E5=95=86=E5=9F=8E=E3=80=91=E9=A2=86=E5=8F=96?= =?UTF-8?q?=E8=89=B2=E5=8D=A1=E5=89=AA=E6=A0=B7-UI=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iconfont.json | 2 +- project.private.config.json | 308 +----------------- .../SelectColorCardStatus/index.module.scss | 12 +- .../SelectColorCardStatus/index.tsx | 15 +- .../index.module.scss | 12 +- src/components/empty/index.tsx | 2 +- src/components/iconfont/iconfont.tsx | 7 +- .../colorCardDetail/index.config.ts | 2 + .../colorCardDetail/index.module.scss | 12 +- .../getColorCard/colorCardDetail/index.tsx | 23 +- .../colorCardList/index.module.scss | 2 +- .../addressDetailBox/index.module.scss | 4 +- .../components/addressDetailBox/index.tsx | 2 +- .../addSampleCutting/index.module.scss | 8 +- .../sampleCutting/addSampleCutting/index.tsx | 9 +- .../sampleCuttingDetail/index.config.ts | 2 + .../sampleCuttingDetail/index.module.scss | 12 +- .../sampleCuttingDetail/index.tsx | 23 +- .../sampleCuttingList/index.module.scss | 6 - .../sampleCutting/sampleCuttingList/index.tsx | 59 ++-- 20 files changed, 133 insertions(+), 389 deletions(-) diff --git a/iconfont.json b/iconfont.json index c9bb489..38da2b2 100644 --- a/iconfont.json +++ b/iconfont.json @@ -1,5 +1,5 @@ { - "symbol_url": "http://at.alicdn.com/t/c/font_3619513_j7pqsqd7ffe.js", + "symbol_url": "http://at.alicdn.com/t/c/font_3619513_3ohlcpete6g.js", "parse_local_svg": true, "local_svg_dir": "./src/styles/svg", "save_dir": "./src/components/iconfont", diff --git a/project.private.config.json b/project.private.config.json index b3e36d5..b5640f2 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,329 +1,37 @@ { - "projectname": "spider_cloud_warehouse", - "setting": { - "compileHotReLoad": true, - "bigPackageSizeSupport": true, - "urlCheck": false - }, "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "condition": { "miniprogram": { "list": [ { - "name": "邀请码", - "pathName": "/pages/inviteCode/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "销售统计", - "pathName": "pages/saleStatistic/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "提货详情", - "pathName": "pages/takeDeliveryDetail/index", - "query": "id=33356", - "launchMode": "default", - "scene": null - }, - { - "name": "提货列表", - "pathName": "pages/takeDelivery/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "发货详情", - "pathName": "pages/deliveryDetail/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "发货列表", - "pathName": "pages/delivery/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "购物页面", - "pathName": "pages/shopping/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "登录页面", - "pathName": "pages/login/index", + "name": "", + "pathName": "pages/getColorCard/index", "query": "", "launchMode": "default", "scene": null }, { "name": "", - "pathName": "pages/index/index", + "pathName": "pages/sampleCutting/addSampleCutting/index", "query": "", "launchMode": "default", "scene": null }, { "name": "", - "pathName": "pages/order/index", - "query": "", + "pathName": "pages/getColorCard/colorCardDetail/index", + "query": "id=2", "launchMode": "default", "scene": null }, { "name": "", - "pathName": "pages/searchPage/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/customerPage/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/orderDetails/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/addressManager/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/addAddress/index", - "query": "type=add", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/orderDetails/index", - "query": "id=27651", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/refundPage/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/refundDetail/index", - "query": "id=607", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/applyGoods/index", - "query": "orderId=28114", - "launchMode": "default", - "scene": null - }, - { - "name": "我的", - "pathName": "pages/user/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/newCollection/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/addCollection/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/submitOrder/index", - "query": "purchaser_id=642&sale_mode=1&shopping_cart_product_color_list%5B2%5D=58994&shopping_cart_product_color_list%5B3%5D=58995", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/applyGoods/index", - "query": "orderId=28503", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/saleStatistic/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/customerManagement/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/customerDetails/index", - "query": "purchaser_id=1674", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/colorRelated/takeColor/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/colorRelated/findColor/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/colorRelated/sampleComparison/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/orderDetails/index", - "query": "id=31743", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/applyGoods/index", - "query": "orderId=31776", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/searchPage/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/applyGoods/index", - "query": "orderId=31742", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/orderDetails/index", - "query": "id=34626", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/refundPage/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "客户列表", - "pathName": "pages/customerManagement/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "客户详情", - "pathName": "pages/customerDetails/index", - "query": "purchaser_id=1705", - "launchMode": "default", - "scene": null - }, - { - "name": "订单页面", - "pathName": "pages/order/index", - "query": "", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/orderEdit/index", - "query": "orderId=34111", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/orderEdit/index", - "query": "orderId=33992", - "launchMode": "default", - "scene": null - }, - { - "name": "", -<<<<<<< HEAD - "pathName": "pages/customerPage/index", - "query": "clientId=1750", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/customerDetails/index", - "query": "purchaser_id=1750", - "launchMode": "default", - "scene": null - }, - { - "name": "", - "pathName": "pages/customerManagement/index", - "query": "", -======= - "pathName": "pages/orderDetails/index", - "query": "id=31651", ->>>>>>> 3de3efe (✨ feat(ID1000902):订单状态添加发货图片) + "pathName": "pages/sampleCutting/sampleCuttingDetail/index", + "query": "id=1", "launchMode": "default", "scene": null } ] } - }, - "libVersion": "2.28.1" + } } \ No newline at end of file diff --git a/src/components/SelectColorCardStatus/index.module.scss b/src/components/SelectColorCardStatus/index.module.scss index 2469554..a9a777f 100644 --- a/src/components/SelectColorCardStatus/index.module.scss +++ b/src/components/SelectColorCardStatus/index.module.scss @@ -2,19 +2,17 @@ padding: 24px 40px; display: grid; grid-gap: 24px 24px; - grid-template-columns: 1fr 1fr; + grid-template-columns: 1fr 1fr 1fr; } .tab_bar { - position: relative; - z-index: 99; - display: flex; - flex-flow: row nowrap; - justify-content: space-between; + display: grid; + grid-gap: 24px 24px; + grid-template-columns: 1fr 1fr 1fr; align-items: center; padding: 20px; background-color: white; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); } .button { - padding: 0 60px; + // padding: 0 60px; } diff --git a/src/components/SelectColorCardStatus/index.tsx b/src/components/SelectColorCardStatus/index.tsx index 55dec01..2a6589c 100644 --- a/src/components/SelectColorCardStatus/index.tsx +++ b/src/components/SelectColorCardStatus/index.tsx @@ -61,16 +61,11 @@ const SelectColorCardStatus = (props: SelectSaleTypeProps, ref) => { {!!enumList.length && enumList.map((item: EnumList, key) => { // 1 申请中 2 已完成 - if ([1, 2, 0].includes(item.id)) { - return ( - handleClick(item.id)}> - {item.name} - - ) - } - else { - return null - } + return ( + handleClick(item.id)}> + {item.name} + + ) })} ) diff --git a/src/components/SelectSampleCuttingStatus/index.module.scss b/src/components/SelectSampleCuttingStatus/index.module.scss index 2469554..a9a777f 100644 --- a/src/components/SelectSampleCuttingStatus/index.module.scss +++ b/src/components/SelectSampleCuttingStatus/index.module.scss @@ -2,19 +2,17 @@ padding: 24px 40px; display: grid; grid-gap: 24px 24px; - grid-template-columns: 1fr 1fr; + grid-template-columns: 1fr 1fr 1fr; } .tab_bar { - position: relative; - z-index: 99; - display: flex; - flex-flow: row nowrap; - justify-content: space-between; + display: grid; + grid-gap: 24px 24px; + grid-template-columns: 1fr 1fr 1fr; align-items: center; padding: 20px; background-color: white; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); } .button { - padding: 0 60px; + // padding: 0 60px; } diff --git a/src/components/empty/index.tsx b/src/components/empty/index.tsx index 1eb51ab..df61d16 100644 --- a/src/components/empty/index.tsx +++ b/src/components/empty/index.tsx @@ -14,7 +14,7 @@ const Empty = (pros: PropsObj) => { return ( - + {picUrl && } {text} ) diff --git a/src/components/iconfont/iconfont.tsx b/src/components/iconfont/iconfont.tsx index 67a7c3e..39247ef 100644 --- a/src/components/iconfont/iconfont.tsx +++ b/src/components/iconfont/iconfont.tsx @@ -24,7 +24,7 @@ function hex2rgb(hex) { return "rgb(" + rgb.join(",") + ")"; } -export type IconNames = 'icon-jianyang' | 'icon-huozhuziti' | 'icon-a-0tianzhangqi' | 'icon-shangchuanwenli' | 'icon-gouwuche' | 'icon-zixun' | 'icon-dianhua' | 'icon-peibu' | 'icon-zhankai1' | 'icon-shouqi1' | 'icon-shouhou1' | 'icon-cangku1' | 'icon-saoma' | 'icon-dizhi1' | 'icon-huodaofukuan' | 'icon-yufukuan1' | 'icon-yue' | 'icon-zidingyi' | 'icon-jinetiaozheng' | 'icon-tuikuan1' | 'icon-zhankai' | 'icon-shouqi' | 'icon-lujing' | 'icon-jizhumima' | 'icon-a-jizhumima' | 'icon-weixindenglu' | 'icon-kehuxinxi' | 'icon-yewuyuanqizi' | 'icon-chakanquanbukehu' | 'icon-biyan' | 'icon-bianji' | 'icon-daikuan' | 'icon-cangku' | 'icon-guanlidingdan' | 'icon-mima' | 'icon-guanbi' | 'icon-jianshao' | 'icon-dingwei' | 'icon-saomiao' | 'icon-peihuo' | 'icon-shaixuan' | 'icon-paiming' | 'icon-shanchusousuoxinxi' | 'icon-shijian' | 'icon-sousuo' | 'icon-shouhou' | 'icon-sousuofanhui' | 'icon-sousuoshanchu' | 'icon-tuikuan' | 'icon-tishi' | 'icon-xianxiahuizong' | 'icon-xinzeng' | 'icon-yonghuming' | 'icon-yanjing' | 'icon-yufukuan' | 'icon-wodekefu' | 'icon-dizhi' | 'icon-shouhouzhongxin' | 'icon-wodeshoucang' | 'icon-shoukuanliebiao' | 'icon-madanguanli' | 'icon-qusechazhao' | 'icon-pandiansaoma' | 'icon-yaoqingma' | 'icon-duizhang' | 'icon-tihuoliebiao' | 'icon-yangpinduibi' | 'icon-yansequyang' | 'icon-fahuoliebiao' | 'icon-yuncangkucun' | 'icon-xiaoshou' | 'icon-qianzhicangkucun' | 'icon-lingquseka' | 'icon-gouwu1' | 'icon-dingdan1' | 'icon-gerenzhongxin1' | 'icon-shouye1' | 'icon-gerenzhongxin' | 'icon-dingdan' | 'icon-shouye' | 'icon-gouwu' | 'icon-wpassword'; +export type IconNames = 'icon-xuanzhongyanse' | 'icon-jianyang' | 'icon-huozhuziti' | 'icon-a-0tianzhangqi' | 'icon-shangchuanwenli' | 'icon-gouwuche' | 'icon-zixun' | 'icon-dianhua' | 'icon-peibu' | 'icon-zhankai1' | 'icon-shouqi1' | 'icon-shouhou1' | 'icon-cangku1' | 'icon-saoma' | 'icon-dizhi1' | 'icon-huodaofukuan' | 'icon-yufukuan1' | 'icon-yue' | 'icon-zidingyi' | 'icon-jinetiaozheng' | 'icon-tuikuan1' | 'icon-zhankai' | 'icon-shouqi' | 'icon-lujing' | 'icon-jizhumima' | 'icon-a-jizhumima' | 'icon-weixindenglu' | 'icon-kehuxinxi' | 'icon-yewuyuanqizi' | 'icon-chakanquanbukehu' | 'icon-biyan' | 'icon-bianji' | 'icon-daikuan' | 'icon-cangku' | 'icon-guanlidingdan' | 'icon-mima' | 'icon-guanbi' | 'icon-jianshao' | 'icon-dingwei' | 'icon-saomiao' | 'icon-peihuo' | 'icon-shaixuan' | 'icon-paiming' | 'icon-shanchusousuoxinxi' | 'icon-shijian' | 'icon-sousuo' | 'icon-shouhou' | 'icon-sousuofanhui' | 'icon-sousuoshanchu' | 'icon-tuikuan' | 'icon-tishi' | 'icon-xianxiahuizong' | 'icon-xinzeng' | 'icon-yonghuming' | 'icon-yanjing' | 'icon-yufukuan' | 'icon-wodekefu' | 'icon-dizhi' | 'icon-shouhouzhongxin' | 'icon-wodeshoucang' | 'icon-shoukuanliebiao' | 'icon-madanguanli' | 'icon-qusechazhao' | 'icon-pandiansaoma' | 'icon-yaoqingma' | 'icon-duizhang' | 'icon-tihuoliebiao' | 'icon-yangpinduibi' | 'icon-yansequyang' | 'icon-fahuoliebiao' | 'icon-yuncangkucun' | 'icon-xiaoshou' | 'icon-qianzhicangkucun' | 'icon-lingquseka' | 'icon-gouwu1' | 'icon-dingdan1' | 'icon-gerenzhongxin1' | 'icon-shouye1' | 'icon-gerenzhongxin' | 'icon-dingdan' | 'icon-shouye' | 'icon-gouwu' | 'icon-wpassword'; type PropsType = { name: IconNames; @@ -84,7 +84,10 @@ const IconFont:FC = ({ className={classnames(icon, customClassName)} /> )} */} - {/* icon-jianyang */} + {/* icon-xuanzhongyanse */} + + { name === 'icon-xuanzhongyanse' && () } +{/* icon-jianyang */} { name === 'icon-jianyang' && () } {/* icon-huozhuziti */} diff --git a/src/pages/getColorCard/colorCardDetail/index.config.ts b/src/pages/getColorCard/colorCardDetail/index.config.ts index 36d2b08..43b5e50 100644 --- a/src/pages/getColorCard/colorCardDetail/index.config.ts +++ b/src/pages/getColorCard/colorCardDetail/index.config.ts @@ -1,3 +1,5 @@ export default { navigationBarTitleText: '色卡详情', + enablePullDownRefresh: true, + backgroundTextStyle: 'dark', } diff --git a/src/pages/getColorCard/colorCardDetail/index.module.scss b/src/pages/getColorCard/colorCardDetail/index.module.scss index d245899..7597eab 100644 --- a/src/pages/getColorCard/colorCardDetail/index.module.scss +++ b/src/pages/getColorCard/colorCardDetail/index.module.scss @@ -44,11 +44,14 @@ page { justify-content: space-between; overflow: hidden; margin-bottom: 24px; + .colorCardImage{ + margin-right: 30px; + margin-bottom: 24px; + } .leftCont { width: 134px; height: 134px; border-radius: 8px; - margin-right: 24px; } .rightCont { flex: 1 1 auto; @@ -181,15 +184,20 @@ page { flex-flow: row nowrap; font-size: 28px; align-items: center; + color: #9c9c9c; } .step-status { font-weight: 550; - color: #393939; + color: inherit; margin-right: 40px; } +.current-status { + color: #393939 !important; +} .attachment{ display: flex; flex-flow: row nowrap; + overflow-x: scroll; .step-url-container { margin-right: 16px; width: 128px; diff --git a/src/pages/getColorCard/colorCardDetail/index.tsx b/src/pages/getColorCard/colorCardDetail/index.tsx index 9af5348..ce94172 100644 --- a/src/pages/getColorCard/colorCardDetail/index.tsx +++ b/src/pages/getColorCard/colorCardDetail/index.tsx @@ -1,6 +1,7 @@ import { Image, Text, View } from '@tarojs/components' -import Taro, { useRouter } from '@tarojs/taro' +import Taro, { usePullDownRefresh, useRouter } from '@tarojs/taro' import { useCallback, useEffect, useState } from 'react' +import classNames from 'classnames' import styles from './index.module.scss' import LayoutBlock from '@/components/layoutBlock' import Divider from '@/components/divider' @@ -30,8 +31,15 @@ const ColorCardDetail = () => { return alert.error(res.msg) } setOrder(res.data) + // 小程序提供的api,通知页面停止下拉刷新效果 + Taro.stopPullDownRefresh() } + // 页面下拉刷新 + usePullDownRefresh(() => { + getData() + }) + const [order, setOrder] = useState({}) const [addressInfo, setAddressInfo] = useState() @@ -83,6 +91,13 @@ const ColorCardDetail = () => { getData() }, []) + const handleClickImagePreview = (imageList: any[], index: number) => { + Taro.previewImage({ + current: formatUrl(imageList[index]), + urls: imageList.map(item => formatUrl(item)), + }) + } + return @@ -98,7 +113,7 @@ const ColorCardDetail = () => { { order.order_progress?.map((item, index) => { return + {item.order_status_name} {formatDateTime(item.audit_time)} @@ -112,7 +127,7 @@ const ColorCardDetail = () => { && { item.delivery_appendix_url?.map((url, index) => { - return + return handleClickImagePreview(item.delivery_appendix_url, index)}> }) @@ -166,7 +181,7 @@ const ColorCardDetail = () => { order.color_card_info?.map((item) => { return ( - + diff --git a/src/pages/getColorCard/colorCardList/index.module.scss b/src/pages/getColorCard/colorCardList/index.module.scss index 3737f2b..537da0d 100644 --- a/src/pages/getColorCard/colorCardList/index.module.scss +++ b/src/pages/getColorCard/colorCardList/index.module.scss @@ -96,7 +96,7 @@ page { padding: 7px; bottom: 0px; right: 0px; - opacity: 0.55; + opacity: 0.70; color: #ffffff; text-align: center; font-size: 24px; diff --git a/src/pages/orderDetails/components/addressDetailBox/index.module.scss b/src/pages/orderDetails/components/addressDetailBox/index.module.scss index 5af4958..9fd5178 100644 --- a/src/pages/orderDetails/components/addressDetailBox/index.module.scss +++ b/src/pages/orderDetails/components/addressDetailBox/index.module.scss @@ -36,7 +36,6 @@ font-weight: 500; color: #000000; margin-right: 41px; - display: flex; align-items: center; display: -webkit-box; -webkit-box-orient: vertical; @@ -142,3 +141,6 @@ } } } +.empty { + display: flex !important; +} diff --git a/src/pages/orderDetails/components/addressDetailBox/index.tsx b/src/pages/orderDetails/components/addressDetailBox/index.tsx index 5fb8399..09eb909 100644 --- a/src/pages/orderDetails/components/addressDetailBox/index.tsx +++ b/src/pages/orderDetails/components/addressDetailBox/index.tsx @@ -54,7 +54,7 @@ const AddressDetailBox = (props: propsObj) => { } { (obj?.province_name == '' && receivingStatus == 2) - && 请选择地址 + && 请选择地址 } { (receivingStatus !== 1 && !isReadonly) diff --git a/src/pages/sampleCutting/addSampleCutting/index.module.scss b/src/pages/sampleCutting/addSampleCutting/index.module.scss index 9c00d31..3736ab5 100644 --- a/src/pages/sampleCutting/addSampleCutting/index.module.scss +++ b/src/pages/sampleCutting/addSampleCutting/index.module.scss @@ -20,9 +20,8 @@ page { overflow-y: scroll; } .addButton { - margin-left: 24px; - margin-right: 24px; - margin-top: 24px; + margin: 24px; + font-size: 28px; } .customerTop { color: #333333; @@ -60,6 +59,7 @@ page { justify-content: space-between; &__top { font-size: 28px; + font-weight: 550; @include common_ellipsis(1); } &__bottom { @@ -81,6 +81,7 @@ page { .paymentMethod { text-align: right; font-size: 28px; + font-weight: 550; color: #f64861; } @@ -128,5 +129,6 @@ page { padding-bottom: calc(20px + env(safe-area-inset-bottom)); } .bottomBar__button { + padding: 0 70px; font-size: 28px; } diff --git a/src/pages/sampleCutting/addSampleCutting/index.tsx b/src/pages/sampleCutting/addSampleCutting/index.tsx index 8e3917e..73f1f48 100644 --- a/src/pages/sampleCutting/addSampleCutting/index.tsx +++ b/src/pages/sampleCutting/addSampleCutting/index.tsx @@ -366,13 +366,8 @@ const AddColorCard = () => { {`#${formatRemoveHashTag(mul.product_color_code)} ${mul.product_color_name}`} - - {/* { - item.affiliation_product.map((product_color, index) => { - return {formatRemoveHashTag(product_color.code)} - }) - } */} - + {/* 占位元素:使counter居右 暂时先这样写吧 */} + { return alert.error(res.msg) } setOrder(res.data) + // 小程序提供的api,通知页面停止下拉刷新效果 + Taro.stopPullDownRefresh() } + // 页面下拉刷新 + usePullDownRefresh(() => { + getData() + }) + const [order, setOrder] = useState({}) const labAndImgObj = useCallback((item) => { @@ -78,6 +86,13 @@ const SampleCuttingDetail = () => { getData() }, []) + const handleClickImagePreview = (imageList: any[], index: number) => { + Taro.previewImage({ + current: formatUrl(imageList[index]), + urls: imageList.map(item => formatUrl(item)), + }) + } + return @@ -93,7 +108,7 @@ const SampleCuttingDetail = () => { { order.order_form?.map((item, index) => { return + {item.order_status_name} {formatDateTime(item.order_time)} @@ -107,7 +122,7 @@ const SampleCuttingDetail = () => { && { item.delivery_appendix_url?.map((url, index) => { - return + return handleClickImagePreview(item.delivery_appendix_url, index)}> }) @@ -163,7 +178,7 @@ const SampleCuttingDetail = () => { item.product_colors?.map((mul) => { return ( - + diff --git a/src/pages/sampleCutting/sampleCuttingList/index.module.scss b/src/pages/sampleCutting/sampleCuttingList/index.module.scss index 8af1cd5..429fe8f 100644 --- a/src/pages/sampleCutting/sampleCuttingList/index.module.scss +++ b/src/pages/sampleCutting/sampleCuttingList/index.module.scss @@ -131,7 +131,6 @@ page { .productList { flex: 1 1 auto; overflow-y: scroll; - margin-top: 30px; padding: 0 48px; display: grid; grid-template-columns: 25% 25% 25% 25%; @@ -172,15 +171,10 @@ page { flex-flow: row nowrap; justify-content: center; align-items: center; - border: 4px solid white; - background-color: $color_main; position: absolute; top: -2px; right: -2px; box-sizing: border-box; - width: 32px; - height: 32px; - border: 2px solid $color_main; border-radius: 50%; z-index: 99; } diff --git a/src/pages/sampleCutting/sampleCuttingList/index.tsx b/src/pages/sampleCutting/sampleCuttingList/index.tsx index 18a12bc..5484841 100644 --- a/src/pages/sampleCutting/sampleCuttingList/index.tsx +++ b/src/pages/sampleCutting/sampleCuttingList/index.tsx @@ -15,6 +15,7 @@ import { formatHashTag, formatRemoveHashTag } from '@/common/format' import Popup from '@/components/popup' import IconFont from '@/components/iconfont/iconfont' import { GetCutSampleOrderColorList, GetCutSampleOrderProducts } from '@/api/sampleCutting' +import Empty from '@/components/empty' export interface SampleCuttingCache { product_id: number @@ -265,12 +266,6 @@ const SampleCuttingList = () => { isAdd?.includes(item.id) || multipleSelection.current.some(mul => mul.product_id === item.id) ? '继续添加' : '添加' } - {/* onSelect(item)} - onClose={() => onUnSelect(item)} - /> */} @@ -301,30 +296,34 @@ const SampleCuttingList = () => { 剪样大小为A4,大约22cm*30cm - - { - productList.map((item, index) => { - const isChecked = productMultipleSelection.some(mul => mul.product_color_id === item.product_color_id) - return handleClickProductColor(item)}> - - { - isChecked - ? - - - : null - } - - - {item.product_color_name} - - }) - } - + { + productList.length + ? + { + productList?.map((item, index) => { + const isChecked = productMultipleSelection.some(mul => mul.product_color_id === item.product_color_id) + return handleClickProductColor(item)}> + + { + isChecked + ? + + + : null + } + + + {item.product_color_name} + + }) + } + + : + }