🐞 fix(ID1001354): 【面料优选&内部小程序】【色卡剪样/领取色卡】--添加色卡后,点击返回键,没弹框提示

【【面料优选&内部小程序】【色卡剪样/领取色卡】--添加色卡后,点击返回键,没弹框提示】 https://www.tapd.cn/53459131/bugtrace/bugs/view/1153459131001001354
This commit is contained in:
xuan 2023-02-27 16:09:03 +08:00
parent 08b8627ec9
commit 1bfd170696
8 changed files with 174 additions and 110 deletions

View File

@ -37,6 +37,20 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/login/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/getColorCard/addColorCard/index",
"query": "",
"launchMode": "default",
"scene": null
}
]
}

View File

@ -15,7 +15,7 @@ export const BASE_URL = CURRENT_BASE_URL
// export const BASE_URL = 'http://192.168.1.7:50002/lymarket' // 添
// export const BASE_URL = 'http://192.168.1.42:50002/lymarket' // 杰
// export const BASE_URL = `http://192.168.1.95:40001/lymarket` // 华
// export const BASE_URL = 'http://192.168.1.28:50001/lymarket' // 婷
// export const BASE_URL = 'http://192.168.1.28:50002/lymarket' // 婷
// CDN
// 生成密钥

View File

@ -1,3 +1,5 @@
export default {
navigationBarTitleText: '领取色卡',
disableSwipeBack: true,
navigationStyle: 'custom',
}

View File

@ -4,6 +4,9 @@ page {
display: flex;
flex-flow: column nowrap;
}
.backIcon {
transform: rotate(180deg);
}
.layoutBlock {
padding: 24px 34px;
}

View File

@ -17,6 +17,7 @@ import Remark from '@/pages/orderDetails/components/remark'
import { formatRemoveHashTag } from '@/common/format'
import { SubmitColorCardOrder } from '@/api/colorCard'
import MoveBtn from '@/components/moveBtn'
import NavBar from '@/pages/order/components/NavBar'
const AddColorCard = () => {
// 获取选择的客户
@ -263,123 +264,141 @@ const AddColorCard = () => {
setRemark(value)
}, [])
return <MoveBtn showList={['businessManager']}>
<View className={styles.main}>
<View className={styles.context}>
{/* 客户信息 */}
<LayoutBlock circle onClick={handleSelectCustomer} customStyle={{ marginTop: '12px' }} customClassName={styles.layoutBlock}>
<View className={styles.customerTop}>
<View></View>
</View>
<Divider direction="horizontal" customStyles={{ margin: '12px 0' }}></Divider>
<View className={styles.customerBottom}>
{
clientInfo.clientId !== -1
? (<>
<Text>
{clientInfo.clientName}
</Text>
<Text>
{clientInfo.clientPhone}
</Text>
</>
)
: <View></View>
}
<IconFont name="icon-chakanquanbukehu" color="#444444" size={32}></IconFont>
</View>
</LayoutBlock>
{
clientInfo.clientId !== -1 && <AddressDetailBox
showBtn={false}
showWhatFont="物流"
navSelect={handSelect}
obj={addressInfo}
receivingStatus={2}
icon={<IconFont name="icon-dizhi1" size={60}></IconFont>}
></AddressDetailBox>
const onClickBack = () => {
Taro.showModal({
content: '返回后页面数据将不回保留,确认返回?',
confirmColor: '#4a8dff',
success: ({ confirm }) => {
if (confirm) {
Taro.navigateBack({
delta: 1,
})
}
},
})
}
<NormalButton customClassName={styles.addButton} circle onClick={handleAddColorCard} plain size="normal" type="primary"></NormalButton>
{/* 色卡信息 */}
<LayoutBlock customStyle={{ marginTop: '12px' }} circle customClassName={styles.layoutBlock}>
<View className={styles.colorCardTop}></View>
<Divider direction="horizontal" customStyles={{ margin: '12px 0' }}></Divider>
return <View className={styles.main}>
<NavBar hasLeft leftSlot={
<View onClick={onClickBack}>
<IconFont customClassName={styles.backIcon} name="icon-chakanquanbukehu" size={48} color="#191919"></IconFont>
</View>
} title="领取色卡"
></NavBar>
<View className={styles.context}>
{/* 客户信息 */}
<LayoutBlock circle onClick={handleSelectCustomer} customStyle={{ marginTop: '12px' }} customClassName={styles.layoutBlock}>
<View className={styles.customerTop}>
<View></View>
</View>
<Divider direction="horizontal" customStyles={{ margin: '12px 0' }}></Divider>
<View className={styles.customerBottom}>
{
order.map((item) => {
return (
<View className={styles.colorCardBottom} key={item.id}>
<View style={{ minWidth: '24%' }}>
<View className={styles.leftCont}>
<LabAndImg value={labAndImgObj(item)} />
</View>
</View>
<View className={styles.rightCont}>
<View className={styles.rightCont__top}>
{item.color_card_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>
<View className={styles.rightCont__right}>
<Counter
onBlue={getInputValue}
defaultNum={item?.count || 1}
onChange={e => handleCountChange(e, item.id)}
onClickBtn={getInputValue}
unit="本"
minNum={0}
maxNum={999}
/>
</View>
</View>
<Divider direction="horizontal" customStyles={{ margin: '12px 0 0 ' }}></Divider>
clientInfo.clientId !== -1
? (<>
<Text>
{clientInfo.clientName}
</Text>
<Text>
{clientInfo.clientPhone}
</Text>
</>
)
: <View></View>
}
<IconFont name="icon-chakanquanbukehu" color="#444444" size={32}></IconFont>
</View>
</LayoutBlock>
{
clientInfo.clientId !== -1 && <AddressDetailBox
showBtn={false}
showWhatFont="物流"
navSelect={handSelect}
obj={addressInfo}
receivingStatus={2}
icon={<IconFont name="icon-dizhi1" size={60}></IconFont>}
></AddressDetailBox>
}
<NormalButton customClassName={styles.addButton} circle onClick={handleAddColorCard} plain size="normal" type="primary"></NormalButton>
{/* 色卡信息 */}
<LayoutBlock customStyle={{ marginTop: '12px' }} circle customClassName={styles.layoutBlock}>
<View className={styles.colorCardTop}></View>
<Divider direction="horizontal" customStyles={{ margin: '12px 0' }}></Divider>
{
order.map((item) => {
return (
<View className={styles.colorCardBottom} key={item.id}>
<View style={{ minWidth: '24%' }}>
<View className={styles.leftCont}>
<LabAndImg value={labAndImgObj(item)} />
</View>
</View>
)
})
}
<View className={styles.paymentMethod}></View>
</LayoutBlock>
{/* 备注信息 */}
<LayoutBlock circle customClassName={styles.layoutBlock} onClick={handleShowDesc}>
<View className={styles.remarkTop}>
<View className={styles.remarkTitle}></View>
<View className={styles.remarkTag}>
<Text>/</Text>
<IconFont name="icon-chakanquanbukehu" color="#444444" size={32}></IconFont>
</View>
<View className={styles.rightCont}>
<View className={styles.rightCont__top}>
{item.color_card_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>
<View className={styles.rightCont__right}>
<Counter
onBlue={getInputValue}
defaultNum={item?.count || 1}
onChange={e => handleCountChange(e, item.id)}
onClickBtn={getInputValue}
unit="本"
minNum={0}
maxNum={999}
/>
</View>
</View>
<Divider direction="horizontal" customStyles={{ margin: '12px 0 0 ' }}></Divider>
</View>
</View>
)
})
}
<View className={styles.paymentMethod}></View>
</LayoutBlock>
{/* 备注信息 */}
<LayoutBlock circle customClassName={styles.layoutBlock} onClick={handleShowDesc}>
<View className={styles.remarkTop}>
<View className={styles.remarkTitle}></View>
<View className={styles.remarkTag}>
<Text>/</Text>
<IconFont name="icon-chakanquanbukehu" color="#444444" size={32}></IconFont>
</View>
<Divider direction="horizontal" customStyles={{ margin: '12px 0' }}></Divider>
<View className={styles.remarkBottom}>
<View className={styles.remarkContent}>{ remark || '尚未备注信息' }</View>
</View>
</LayoutBlock>
</View>
<View className={styles.bottomBar}>
<View className={styles.bottomTotal}>
{order.length} , {order.reduce((total, curr) => total + (curr.count || 1), 0)}
</View>
<NormalButton
customClassName={styles.bottomBar__button}
type="primary"
round
onClick={handleSubmitOrder}
>
</NormalButton>
<Divider direction="horizontal" customStyles={{ margin: '12px 0' }}></Divider>
<View className={styles.remarkBottom}>
<View className={styles.remarkContent}>{ remark || '尚未备注信息' }</View>
</View>
</LayoutBlock>
</View>
<Popup show={showDesc} showTitle={false} onClose={() => setShowDesc(false)}>
<Remark onSave={getRemark} defaultValue={remark} showInput={!!showDesc} />
</Popup>
</View>
</MoveBtn>
<View className={styles.bottomBar}>
<View className={styles.bottomTotal}>
{order.length} , {order.reduce((total, curr) => total + (curr.count || 1), 0)}
</View>
<NormalButton
customClassName={styles.bottomBar__button}
type="primary"
round
onClick={handleSubmitOrder}
>
</NormalButton>
</View>
<Popup show={showDesc} showTitle={false} onClose={() => setShowDesc(false)}>
<Remark onSave={getRemark} defaultValue={remark} showInput={!!showDesc} />
</Popup>
</View>
}
export default AddColorCard

View File

@ -1,3 +1,5 @@
export default {
navigationBarTitleText: '领取剪样',
disableSwipeBack: true,
navigationStyle: 'custom',
}

View File

@ -4,6 +4,9 @@ page {
display: flex;
flex-flow: column nowrap;
}
.backIcon {
transform: rotate(180deg);
}
.layoutBlock {
padding: 24px 34px;
}

View File

@ -16,6 +16,7 @@ import Popup from '@/components/popup'
import Remark from '@/pages/orderDetails/components/remark'
import { formatRemoveHashTag } from '@/common/format'
import { SubmitCutSampleOrder } from '@/api/sampleCutting'
import NavBar from '@/pages/order/components/NavBar'
const AddColorCard = () => {
// 获取选择的客户
@ -310,7 +311,27 @@ const AddColorCard = () => {
}, 0)
}, [order])
const onClickBack = () => {
Taro.showModal({
content: '返回后页面数据将不回保留,确认返回?',
confirmColor: '#4a8dff',
success: ({ confirm }) => {
if (confirm) {
Taro.navigateBack({
delta: 1,
})
}
},
})
}
return <View className={styles.main}>
<NavBar hasLeft leftSlot={
<View onClick={onClickBack}>
<IconFont customClassName={styles.backIcon} name="icon-chakanquanbukehu" size={48} color="#191919"></IconFont>
</View>
} title="领取剪样"
></NavBar>
<View className={styles.context}>
{/* 客户信息 */}
<LayoutBlock circle onClick={handleSelectCustomer} customStyle={{ marginTop: '12px' }} customClassName={styles.layoutBlock}>