diff --git a/iconfont.json b/iconfont.json index b2df217..07d1de9 100644 --- a/iconfont.json +++ b/iconfont.json @@ -1,5 +1,5 @@ { - "symbol_url": "http://at.alicdn.com/t/c/font_3619513_at0bezg87xk.js", + "symbol_url": "http://at.alicdn.com/t/c/font_3619513_bvm50rcxi49.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 01877fd..500c9bd 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -107,6 +107,27 @@ "query": "", "launchMode": "default", "scene": null + }, + { + "name": "", + "pathName": "pages/submitOrder/index", + "query": "purchaser_id=1860&sale_mode=2&shopping_cart_product_color_list=%5B75384%2C75385%5D&purchaser_name=%E5%A4%A7%E5%90%89%E5%A4%A7%E5%88%A9", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "pages/submitOrder/index", + "query": "purchaser_id=1808&sale_mode=0&shopping_cart_product_color_list=%5B71143%2C71159%2C71160%5D&purchaser_name=%E6%B8%B8%E5%AE%A2_65d59b5", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "pages/orderDetails/index", + "query": "id=34311", + "launchMode": "default", + "scene": null } ] } diff --git a/src/api/order.ts b/src/api/order.ts index 721c4b1..3d0d067 100644 --- a/src/api/order.ts +++ b/src/api/order.ts @@ -232,3 +232,19 @@ export const MpsaleOrdersubmit = () => { method: 'put', }) } + +// 通过调价销售单审核 +export const PassAdjustPriceAudit = () => { + return useRequest({ + url: '/v2/mp/saleOrder/passAdjustPriceAudit', + method: 'put', + }) +} + +// 拒绝调价销售单审核 +export const RefuseAdjustPriceAudit = () => { + return useRequest({ + url: '/v2/mp/saleOrder/refuseAdjustPriceAudit', + method: 'put', + }) +} diff --git a/src/components/Dialog/index.tsx b/src/components/Dialog/index.tsx index 55cafca..ace78e8 100644 --- a/src/components/Dialog/index.tsx +++ b/src/components/Dialog/index.tsx @@ -10,10 +10,11 @@ interface PropsType { onClose?: (show: boolean) => void onChange?: (isShow) => void children?: React.ReactNode + zIndex?: number } // 弹出框 const Dialog = (props: PropsType) => { - const { showOverLay = true, show = false, onClose: _onClose, onChange: _onChange, children } = props + const { showOverLay = true, zIndex = 99, show = false, onClose: _onClose, onChange: _onChange, children } = props const [_show, setShow] = usePropsValue({ value: show, @@ -47,14 +48,18 @@ const Dialog = (props: PropsType) => { } }, [show]) return _show - ? + ? {/* 遮罩层 start */} {/* 遮罩层 end */} - + {children} diff --git a/src/components/Modal/index.module.scss b/src/components/Modal/index.module.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/components/Modal/index.tsx b/src/components/Modal/index.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/components/iconfont/iconfont.tsx b/src/components/iconfont/iconfont.tsx index f51e707..f6e894e 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-xinzenganniu' | 'icon-jianshaoanniu' | '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'; +export type IconNames = 'icon-bianji1' | 'icon-daishenhe' | 'icon-shenhejujue' | 'icon-shenhetongguo' | 'icon-xinzenganniu' | 'icon-jianshaoanniu' | '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,19 @@ const IconFont:FC = ({ className={classnames(icon, customClassName)} /> )} */} - {/* icon-xinzenganniu */} + {/* icon-bianji1 */} + + { name === 'icon-bianji1' && () } +{/* icon-daishenhe */} + + { name === 'icon-daishenhe' && () } +{/* icon-shenhejujue */} + + { name === 'icon-shenhejujue' && () } +{/* icon-shenhetongguo */} + + { name === 'icon-shenhetongguo' && () } +{/* icon-xinzenganniu */} { name === 'icon-xinzenganniu' && () } {/* icon-jianshaoanniu */} diff --git a/src/custom-tab-bar/index.tsx b/src/custom-tab-bar/index.tsx index d31332e..656d837 100644 --- a/src/custom-tab-bar/index.tsx +++ b/src/custom-tab-bar/index.tsx @@ -42,12 +42,19 @@ const CustomTabBar: FC = () => { const setSelected = (id: TabBarIndexMap[number]['id']) => { dispatch({ type: TabBarType.SET_SELECTED, data: { tabItem, selectedId: id } }) } - const handleSelectTabItem = debounce(async(id: TabBarIndexMap[number]['id']) => { - setSelected(id) + const handleSelectTabItem = async(id: TabBarIndexMap[number]['id']) => { if (id === 3) { await openSubscriptionMessage({ scenes: 1 }) } + if (id === 4) { + await openSubscriptionMessage({ scenes: 2 }) + } console.log(id, 'item') + jump(id) + } + + const jump = debounce((id) => { + setSelected(id) Taro.switchTab({ url: tabItem?.find(item => item.id === id)?.pagePath as string }) }, 300) diff --git a/src/pages/orderDetails/components/addressDetailBox/index.module.scss b/src/pages/orderDetails/components/addressDetailBox/index.module.scss index fd11846..005de74 100644 --- a/src/pages/orderDetails/components/addressDetailBox/index.module.scss +++ b/src/pages/orderDetails/components/addressDetailBox/index.module.scss @@ -128,7 +128,7 @@ border-radius: 16px; position: absolute; width: 100px; - height: 61px; + height: 64px; z-index: 1; transition: all 0.3s ease-in-out; } diff --git a/src/pages/orderDetails/index.module.scss b/src/pages/orderDetails/index.module.scss index 7832ddb..5a6229c 100644 --- a/src/pages/orderDetails/index.module.scss +++ b/src/pages/orderDetails/index.module.scss @@ -1,6 +1,88 @@ page { background: #f7f7f7; } +.passBackground { + background: url('https://cdn.zzfzyc.com/orderDetail/pass_background.png'); + background-size: contain; + background-repeat: no-repeat; +} +.refuseBackground { + background-image: url('https://cdn.zzfzyc.com/orderDetail/refuse_background.png'); + background-size: contain; + background-repeat: no-repeat; +} +.pendingBackground { + background: url('https://cdn.zzfzyc.com/orderDetail/pending_background.png'); + background-size: contain; + background-repeat: no-repeat; +} +.status { + position: absolute; + top: 0; + left: 0; + width: 100%; + display: flex; + flex-flow: row nowrap; + box-sizing: border-box; + padding: 40px 32px; + height: 257px; + .statusLeft { + width: 50%; + } + .statusRight { + width: 50%; + font-size: 26px; + color: #736d6e; + line-height: 32px; + .name { + margin-top: 24px; + } + .time { + margin-top: 17px; + } + .buttonBar { + margin-top: 24px; + justify-content: flex-end; + display: flex; + flex-flow: row nowrap; + align-items: center; + } + .refuseButton { + border-radius: 8px; + background-color: #eff4fe; + } + .passButton { + border-radius: 8px; + margin-left: 20px; + } + } + .statusTitle { + display: flex; + flex-flow: row nowrap; + align-items: center; + .statusName { + margin-left: 10px; + font-size: 40px; + } + .refuseName{ + + color: #f65269; + } + .passName{ + color: #00ab5b; + + } + .pendingName{ + color: #333; + + } + } + .price { + color: #757172; + font-size: 26px; + margin-top: 16px; + } +} .mainBox { .pussBox { diff --git a/src/pages/orderDetails/index.tsx b/src/pages/orderDetails/index.tsx index 50c0aa4..e3bf0ea 100644 --- a/src/pages/orderDetails/index.tsx +++ b/src/pages/orderDetails/index.tsx @@ -1,4 +1,4 @@ -import { View } from '@tarojs/components' +import { Text, 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' @@ -27,14 +27,18 @@ import { OrderPaymentOrderPaymentSubmission, OrderPaymentPreCollectOrderOrderPaymentMethodInfo, OrderPaymentPreCollectOrderOrderPaymentSubmission, + PassAdjustPriceAudit, + RefuseAdjustPriceAudit, } from '@/api/order' import { alert, goLink } from '@/common/common' -import { formatDateTime, formatHashTag, formatPriceDiv, formatRemoveHashTag, formatWeightDiv } from '@/common/format' +import { formatDateTime, formatHashTag, formatMeterDiv, formatPriceDiv, formatRemoveHashTag, formatWeightDiv } from '@/common/format' import IconFont from '@/components/iconfont/iconfont' import { IMG_CND_Prefix, PAY_H5_CODE_URL } from '@/common/constant' import SaleCodeList from '@/components/SaleCodeList' import LabAndImg from '@/components/LabAndImg' import Tag from '@/components/tag' +import { EnumSaleMode } from '@/common/Enumerate' +import NormalButton from '@/components/normalButton' // 卡片盒子元素 interface Obs { @@ -121,13 +125,13 @@ const GoodsItem = (porps: PropGoods) => { // {/* 第二个版本的样式 */} - {formatHashTag(it.code, it.name)} x{obj?.sale_mode === 0 ? it.roll : it.length / 100}{obj?.sale_mode === 0 ? '条' : 'm'} + {formatHashTag(it.code, it.name)} x{obj?.sale_mode === EnumSaleMode.Bulk ? it.roll : formatMeterDiv(it.length)}{obj?.sale_mode === EnumSaleMode.Bulk ? '条' : 'm'} { - obj?.sale_mode === 0 && it?.sale_price !== it?.standard_sale_price && ¥{it?.standard_sale_price / 100}/{obj?.sale_mode === 1 ? 'm' : 'kg'} + (obj?.sale_mode === EnumSaleMode.Bulk && it?.sale_price !== it?.standard_sale_price) ? ¥{formatPriceDiv(it?.standard_sale_price)}/kg : null } - ¥{formatPriceDiv(it.sale_price)}/{obj?.sale_mode === 1 ? 'm' : 'kg'} + ¥{formatPriceDiv(it.sale_price)}/{obj?.sale_mode === EnumSaleMode.Plate ? 'm' : 'kg'} ¥{formatPriceDiv(it.total_sale_price)} @@ -144,6 +148,96 @@ const GoodsItem = (porps: PropGoods) => { ) } const GoodsItemWithMemo = memo(GoodsItem) +enum AdjustPriceAuditStatus { + NONE = 0, + PASS = 3, + PENDING = 1, + REFUSE = 2, +} +interface NotificationProps{ + salesOrderId: number + auditStatus: AdjustPriceAuditStatus + baseData: any + onSuccess: () => void +} +// 服务通知 +const ServicesNotification = (props: NotificationProps) => { + const { salesOrderId, auditStatus, baseData, onSuccess } = props + const { fetchData: pass } = PassAdjustPriceAudit() + const { fetchData: refuse } = RefuseAdjustPriceAudit() + + const handleRefuse = async() => { + const res = await refuse({ + sale_order_id: salesOrderId, + }) + if (res.success) { + Taro.showToast({ + title: '拒绝成功', + icon: 'success', + duration: 2000, + }) + onSuccess() + } + } + const handlePass = async() => { + const res = await pass({ + sale_order_id: salesOrderId, + }) + if (res.success) { + Taro.showToast({ + title: '审核通过', + icon: 'success', + duration: 2000, + }) + onSuccess() + } + } + const statusStyles = useMemo(() => { + const res = { + background: '', + textColor: '', + icon: null as React.ReactNode, + } + if (auditStatus === AdjustPriceAuditStatus.PENDING) { + res.background = styles.pendingBackground + res.textColor = styles.pendingName + res.icon = + } + else if (auditStatus === AdjustPriceAuditStatus.PASS) { + res.background = styles.passBackground + res.textColor = styles.passName + res.icon = + } + else if (auditStatus === AdjustPriceAuditStatus.REFUSE) { + res.background = styles.refuseBackground + res.textColor = styles.refuseName + res.icon = + } + return res + }, [auditStatus]) + return + + + {statusStyles.icon} + {baseData.adjust_price_audit_status_name} + + 单价调整超过 {formatPriceDiv(baseData.max_adjust_price)} 元 + + + { + auditStatus === AdjustPriceAuditStatus.PENDING + ? + 拒绝 + 同意 + + : <> + 审核人员:{baseData.adjust_price_audit_name} + 审核时间:{formatDateTime(baseData.adjust_price_audit_time)} + + } + + +} const OrderDetails = () => { const router = useRouter() @@ -207,7 +301,7 @@ const OrderDetails = () => { }) const res = await infoFetch({ id: router.params.id }) - orderMsg.map((it) => { + orderMsg.forEach((it) => { if (it.leftTitle === '订单编号:') { it.rightTitle = res.data.order_no } @@ -828,12 +922,21 @@ const OrderDetails = () => { }) } + const onSuccess = () => { + getDetail() + } + return ( - {(infoObj?.status != 10 && )} - { - infoObj.status === 10 && refresh()} /> - } + + { + infoObj.adjust_price_audit_status !== AdjustPriceAuditStatus.NONE && + } + {(infoObj?.status != 10 && )} + { + infoObj.status === 10 && refresh()} /> + } + { } = props return ( - + {title} { @@ -47,35 +52,128 @@ const DefaultBox = (props: Obs) => { {children} - + ) } const DefaultBoxWithMemo = memo(DefaultBox) // 产品商品元素 interface PropGoods { - // item?: { - // code?: string | number - // } list: any[] obj: { sale_mode?: number | string } + updateList: (list: any[]) => void } -const GoodsItem = (porps: PropGoods) => { - const { list = [], obj = {} } = porps +const GoodsItem = (props: PropGoods) => { + const { list = [], obj = {}, updateList } = props + + const [goodsList, setGoodsList] = useState(list) + + useEffect(() => { + setGoodsList(list) + }, [list]) const labAndImgObj = useCallback((item) => { return { lab: item.lab, rgb: item.rgb, texture_url: item.texture_url } }, []) + + // 长度为2 单价调整,长度为1 批量调整 + const editPayload = useRef([]) + + // 批量调整 + const handleClickBulkEdit = (parentId: number) => { + editPayload.current = [parentId] + setShowBulkPopup(true) + } + + // 单价调整 + const handleEdit = (subId: number, parentId: number) => { + editPayload.current = [subId, parentId] + setShowPopup(true) + } + + const [showBulkPopup, setShowBulkPopup] = useState(false) + const handleBulkPopupChange = (bool) => { + setShowBulkPopup(bool) + } + const [showPopup, setShowPopup] = useState(false) + const handleChange = (bool) => { + setShowPopup(bool) + } + + const handleCancel = () => { + setShowPopup(false) + setShowBulkPopup(false) + } + // 单价调整点击确认 + const handleConfirm = () => { + if (errorMsg) { return } + const res = list.map((item) => { + if (item.id === editPayload.current[1]) { + item.product_colors = item.product_colors.map((it) => { + if (it.id === editPayload.current[0]) { + it.sale_price = it.origin_price + formatPriceMul(value) + } + return it + }) + } + return item + }) + setGoodsList(res) + handleCancel() + updateList(res) + } + + // 批量调整点击确认 + const handleBulkConfirm = () => { + if (errorMsg) { return } + const res = list.map((item) => { + if (item.id === editPayload.current[0]) { + item.product_colors = item.product_colors.map((it) => { + it.sale_price = it.origin_price + formatPriceMul(value) + return it + }) + } + return item + }) + setGoodsList(res) + handleCancel() + updateList(res) + } + // 批量调整 + // 单价调整 + const [value, setValue] = useState('-1.5') + + const handleInput = (e) => { + const res = e.detail.value + setValue(res) + } + + const errorMsg = useMemo(() => { + let msg = '' + if (Number(value) < -3) { + msg = '不能小于-3' + } + else { + msg = '' + } + return msg + }, [value]) + return ( - <> + { - list.map((item, index) => { + goodsList.map((item, index) => { return ( - - {formatRemoveHashTag(item.code)}# {item.name} - + + + {formatRemoveHashTag(item.code)}# {item.name} + handleClickBulkEdit(item.id)}> + + + + { item.product_colors.map((it, inx) => { return ( @@ -84,30 +182,71 @@ const GoodsItem = (porps: PropGoods) => { - - {formatRemoveHashTag(it.code)}# {it.name} - x{obj?.sale_mode === EnumSaleMode.Bulk ? it.roll : formatMeterDiv(it.length)}{obj?.sale_mode === 0 ? '条' : 'm'} - - - - ¥{formatPriceDiv(it.sale_price)}/{obj?.sale_mode === EnumSaleMode.Plate ? 'm' : 'kg'} - { - (obj?.sale_mode === EnumSaleMode.Bulk && it?.sale_price !== it?.standard_price) ? ¥{formatPriceDiv(it?.standard_price)}/kg : null - } + + + {formatRemoveHashTag(it.code)}# {it.name} + x{obj?.sale_mode === EnumSaleMode.Bulk ? it.roll : formatMeterDiv(it.length)}{obj?.sale_mode === 0 ? '条' : 'm'} + + + + ¥{formatPriceDiv(it.sale_price)}/{obj?.sale_mode === EnumSaleMode.Plate ? 'm' : 'kg'} + { + (obj?.sale_mode === EnumSaleMode.Bulk && it?.sale_price !== it?.standard_price) ? ¥{formatPriceDiv(it?.standard_price)}/kg : null + } + handleEdit(it.id, item.id)}> + + + + ¥{formatPriceDiv(it.estimate_amount)} - - ¥{formatPriceDiv(it.estimate_amount)} + ) }) } - + ) }) } - + + + 批量调整 + + + + + {errorMsg && {errorMsg}} + 批量调价是在标准报价基础上调整,增加价格则输入正数,减少则输入负数 + + + + 取消 + + 确认 + + + + + + 单价调整 + + + + + {errorMsg && {errorMsg}} + 调价是在标准报价基础上调整,增加价格则输入正数,减少则输入负数 + + + + 取消 + + 确认 + + + + ) } @@ -176,7 +315,17 @@ const SubmitOrder = () => { shopping_cart_product_color_list: list, } const res = await infoFetch(query) - setInfoObj(res.data) + setInfoObj({ + ...res.data, + product_list: res.data.product_list.map((item) => { + item.product_colors = item.product_colors.map((it) => { + // 用于存储原始价格,(单价/批量)调整价格 + it.origin_price = it.sale_price + return it + }) + return item + }), + }) } // 备注操作 @@ -301,43 +450,47 @@ const SubmitOrder = () => { getAddress() getDetail() }, []) + + const updateList = (list: any[]) => { + setInfoObj(val => ({ + ...val, + product_list: list, + })) + } + return ( - handSelect(obj)} - obj={infoObj} - receivingStatus={receivingStatus} - onReceivingStatus={(e, value) => onReceivingStatus(e, value)} - > - - - {pussName} - {/* {infoObj.purchaser_phone} */} - - - {/* {infoObj.product_list?.length} 种面料,{infoObj.total_colors} 个颜色,共 {infoObj.sale_mode === 0 ? infoObj.total_number : infoObj.total_number / 100} {infoObj.sale_mode === 0 ? '条' : 'm'} */} - - - - - 合计金额 - - {/* */} + + + handSelect(obj)} + obj={infoObj} + receivingStatus={receivingStatus} + onReceivingStatus={(e, value) => onReceivingStatus(e, value)} + > + + + {pussName} + + + + + + + 合计金额 + + + ¥{formatPriceDiv(infoObj.estimate_amount)} - ¥{formatPriceDiv(infoObj.estimate_amount)} + `} clickNode={() => setShowDesc(true)}> + {!infoObj.remark ? '暂无' : infoObj.remark} + - `} clickNode={() => setShowDesc(true)}> - {infoObj.remark === '' ? '暂无' : infoObj.remark} - - setShowDesc(false)}> - getRemark(e)} defaultValue={infoObj.remark} showInput={!!showDesc} /> - - @@ -348,6 +501,10 @@ const SubmitOrder = () => { handSure()}>提交订单 + + setShowDesc(false)}> + getRemark(e)} defaultValue={infoObj.remark} showInput={!!showDesc} /> + ) } diff --git a/src/use/useCommon.ts b/src/use/useCommon.ts index f899679..f1c122b 100644 --- a/src/use/useCommon.ts +++ b/src/use/useCommon.ts @@ -77,8 +77,14 @@ export const UseSubscriptionMessage = () => { if (res.success && res.data.TemplateID && res.data.TemplateID.length > 0) { Taro.requestSubscribeMessage({ tmplIds: res.data.TemplateID, + success: (res) => { + console.log('success res', res) + Taro.showToast({ + title: '订阅成功', + icon: 'success', + }) + }, complete(res) { - console.log('qqqqqq') resolve(res) }, })