🐞 fix(ID1001328): 【内部商城】领取色卡剪样-UI还原

This commit is contained in:
xuan 2023-02-24 17:33:01 +08:00
parent b71773906d
commit 8bea176292
20 changed files with 133 additions and 389 deletions

View File

@ -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",

View File

@ -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"
}
}

View File

@ -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;
}

View File

@ -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 (
<FilterButton round customClassName={styles.button} key={key} size="small" isActive={item.id === currentValue} onClick={() => handleClick(item.id)}>
{item.name}
</FilterButton>
)
}
else {
return null
}
})}
</View>
)

View File

@ -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;
}

View File

@ -14,7 +14,7 @@ const Empty = (pros: PropsObj) => {
return (
<View className={styles.mainBox}>
<Image className={styles.pic} mode="aspectFill" lazyLoad src={picUrl}></Image>
{picUrl && <Image className={styles.pic} mode="aspectFill" lazyLoad src={picUrl}></Image>}
<View className={styles.text}>{text}</View>
</View>
)

View File

@ -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<PropsType> = ({
className={classnames(icon, customClassName)}
/>
)} */}
{/* icon-jianyang */}
{/* icon-xuanzhongyanse */}
{ name === 'icon-xuanzhongyanse' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 0c282.784 0 512 229.216 512 512s-229.216 512-512 512S0 794.784 0 512 229.216 0 512 0z m0 85.344C276.352 85.344 85.344 276.384 85.344 512c0 235.648 191.04 426.656 426.656 426.656 235.648 0 426.656-191.04 426.656-426.656 0-235.648-191.04-426.656-426.656-426.656z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(255,255,255)'}'/%3E%3Cpath d='M512 512m-426.656 0a426.656 426.656 0 1 0 853.312 0 426.656 426.656 0 1 0-853.312 0Z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(51,127,255)'}'/%3E%3Cpath d='M764.8 372.576c16.64 16.64 16.64 43.68 0 60.352l-286.624 286.592c-16.64 16.672-43.68 16.672-60.352 0L275.84 577.504a42.656 42.656 0 1 1 60.352-60.32L448 628.992l256.448-256.416a42.656 42.656 0 0 1 57.28-2.784l3.04 2.784z' fill='${(isStr ? colors : colors?.[2]) || 'rgb(255,255,255)'}'/%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) }
{/* icon-jianyang */}
{ name === 'icon-jianyang' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M240.824889 112c-63.559111 61.482667-65.322667 162.816-3.953778 226.474667l347.064889 360.035555a159.772444 159.772444 0 0 0-15.701333 69.319111c0 88.462222 71.580444 160.170667 159.886222 160.170667 88.291556 0 159.872-71.708444 159.872-160.170667 0-88.462222-71.580444-160.170667-159.872-160.170666-3.456 0-6.883556 0.099556-10.282667 0.327111l0.568889-0.540445-477.582222-495.445333z m487.296 575.744a80.014222 80.014222 0 0 1 79.928889 80.071111 80.014222 80.014222 0 0 1-79.928889 80.099556 80.014222 80.014222 0 0 1-79.943111-80.085334 80.014222 80.014222 0 0 1 79.928889-80.085333z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' fill-opacity='.402'/%3E%3Cpath d='M791.182222 112c63.544889 61.482667 65.322667 162.816 3.953778 226.474667L448.071111 698.510222a159.772444 159.772444 0 0 1 15.701333 69.319111c0 88.462222-71.580444 160.170667-159.886222 160.170667-88.305778 0-159.886222-71.708444-159.886222-160.170667 0-88.462222 71.580444-160.170667 159.886222-160.170666 3.456 0 6.883556 0.099556 10.282667 0.327111l-0.568889-0.540445L791.182222 112zM303.886222 687.744a80.014222 80.014222 0 0 0-79.943111 80.071111 80.014222 80.014222 0 0 0 79.928889 80.099556 80.014222 80.014222 0 0 0 79.957333-80.085334 80.014222 80.014222 0 0 0-79.943111-80.085333z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}'/%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) }
{/* icon-huozhuziti */}

View File

@ -1,3 +1,5 @@
export default {
navigationBarTitleText: '色卡详情',
enablePullDownRefresh: true,
backgroundTextStyle: 'dark',
}

View File

@ -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;

View File

@ -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<any>({})
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 <View className={styles.main} >
<View className={styles.context}>
<LayoutBlock circle customStyle={{ padding: '24rpx', marginTop: '24rpx' }}>
@ -98,7 +113,7 @@ const ColorCardDetail = () => {
{
order.order_progress?.map((item, index) => {
return <Step key={index} status={item.order_status === 3 ? 'error' : undefined} title={
<View className={styles['step-title']}>
<View className={classNames(styles['step-title'], item.order_status === order.order_status ? styles['current-status'] : null)}>
<Text className={styles['step-status']}>{item.order_status_name}</Text>
<Text>{formatDateTime(item.audit_time)}</Text>
</View>
@ -112,7 +127,7 @@ const ColorCardDetail = () => {
&& <View className={styles.attachment}>
{
item.delivery_appendix_url?.map((url, index) => {
return <View className={styles['step-url-container']} key={index}>
return <View className={styles['step-url-container']} key={index} onClick={() => handleClickImagePreview(item.delivery_appendix_url, index)}>
<Image className={styles['step-url']} src={formatUrl(url)} lazyLoad mode="aspectFill" />
</View>
})
@ -166,7 +181,7 @@ const ColorCardDetail = () => {
order.color_card_info?.map((item) => {
return (
<View className={styles.colorCardBottom} key={item.id}>
<View style={{ minWidth: '24%' }}>
<View className={styles.colorCardImage}>
<View className={styles.leftCont}>
<LabAndImg value={labAndImgObj(item)} />
</View>

View File

@ -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;

View File

@ -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;
}

View File

@ -54,7 +54,7 @@ const AddressDetailBox = (props: propsObj) => {
}
{
(obj?.province_name == '' && receivingStatus == 2)
&& <View className={styles.address}></View>
&& <View className={classnames(styles.address, styles.empty)}></View>
}
{
(receivingStatus !== 1 && !isReadonly)

View File

@ -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;
}

View File

@ -366,13 +366,8 @@ const AddColorCard = () => {
{`#${formatRemoveHashTag(mul.product_color_code)} ${mul.product_color_name}`}
</View>
<View className={styles.rightCont__bottom}>
<View className={styles.rightCont__left}>
{/* {
item.affiliation_product.map((product_color, index) => {
return <Tag customStyle={{ marginRight: '5px', marginBottom: '2px', padding: '5px', background: '#e3ecff', color: '#558cff', borderColor: '#e3ecff' }} key={index} size="small" circle>{formatRemoveHashTag(product_color.code)}</Tag>
})
} */}
</View>
{/* 占位元素使counter居右 暂时先这样写吧 */}
<View className={styles.rightCont__left}></View>
<View className={styles.rightCont__right}>
<Counter
onBlue={getInputValue}

View File

@ -1,3 +1,5 @@
export default {
navigationBarTitleText: '剪样订单详情',
enablePullDownRefresh: true,
backgroundTextStyle: 'dark',
}

View File

@ -44,6 +44,10 @@ page {
justify-content: space-between;
overflow: hidden;
margin-bottom: 24px;
.colorCardImage {
margin-right: 30px;
margin-bottom: 24px;
}
.leftCont {
width: 134px;
height: 134px;
@ -181,13 +185,17 @@ 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;
}
.attachment{
.current-status {
color: #393939 !important;
}
.attachment {
display: flex;
flex-flow: row nowrap;
.step-url-container {

View File

@ -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'
@ -27,8 +28,15 @@ const SampleCuttingDetail = () => {
return alert.error(res.msg)
}
setOrder(res.data)
// 小程序提供的api通知页面停止下拉刷新效果
Taro.stopPullDownRefresh()
}
// 页面下拉刷新
usePullDownRefresh(() => {
getData()
})
const [order, setOrder] = useState<any>({})
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 <View className={styles.main} >
<View className={styles.context}>
<LayoutBlock circle customStyle={{ padding: '24rpx', marginTop: '24rpx' }}>
@ -93,7 +108,7 @@ const SampleCuttingDetail = () => {
{
order.order_form?.map((item, index) => {
return <Step key={index} status={item.order_status === 4 ? 'error' : undefined} title={
<View className={styles['step-title']}>
<View className={classNames(styles['step-title'], item.order_status === order.order_form?.[0].order_status ? styles['current-status'] : null)}>
<Text className={styles['step-status']}>{item.order_status_name}</Text>
<Text>{formatDateTime(item.order_time)}</Text>
</View>
@ -107,7 +122,7 @@ const SampleCuttingDetail = () => {
&& <View className={styles.attachment}>
{
item.delivery_appendix_url?.map((url, index) => {
return <View className={styles['step-url-container']} key={index}>
return <View className={styles['step-url-container']} key={index} onClick={() => handleClickImagePreview(item.delivery_appendix_url, index)}>
<Image className={styles['step-url']} src={formatUrl(url)} lazyLoad mode="aspectFill" />
</View>
})
@ -163,7 +178,7 @@ const SampleCuttingDetail = () => {
item.product_colors?.map((mul) => {
return (
<View className={styles.colorCardBottom} key={mul.product_color_id}>
<View style={{ minWidth: '24%' }}>
<View className={styles.colorCardImage}>
<View className={styles.leftCont}>
<LabAndImg value={labAndImgObj(mul)} />
</View>

View File

@ -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;
}

View File

@ -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) ? '继续添加' : '添加'
}
</NormalButton>
{/* <MCheckbox
disabled={isAdd?.includes(item.id)}
status={isAdd?.includes(item.id) || item.status}
onSelect={() => onSelect(item)}
onClose={() => onUnSelect(item)}
/> */}
</View>
</View>
</View>
@ -301,16 +296,18 @@ const SampleCuttingList = () => {
A422cm*30cm
</View>
</View>
<View className={styles.productList}>
{
productList.map((item, index) => {
productList.length
? <View className={styles.productList}>
{
productList?.map((item, index) => {
const isChecked = productMultipleSelection.some(mul => mul.product_color_id === item.product_color_id)
return <View key={index} className={styles.item} onClick={() => handleClickProductColor(item)}>
<View className={classNames(styles.item_color, isChecked ? styles.productColorActive : null)}>
{
isChecked
? <View className={styles.activeIcon}>
<IconFont name="icon-lujing" size={20} color="white"></IconFont>
<IconFont name="icon-xuanzhongyanse" size={32}></IconFont>
</View>
: null
}
@ -325,6 +322,8 @@ const SampleCuttingList = () => {
})
}
</View>
: <Empty text="暂无数据" />
}
</View>
<View className={classNames(styles.bottomBar, styles.popup_bottom)}>