商城测试版v7
This commit is contained in:
@@ -165,7 +165,7 @@ import { throttle } from "@/common/util";
|
||||
alert.none(res.msg)
|
||||
}
|
||||
}
|
||||
}, 600)
|
||||
}, 800)
|
||||
|
||||
//页面下拉刷新
|
||||
usePullDownRefresh(() => {
|
||||
|
||||
@@ -125,7 +125,7 @@ export default memo(({order, comfirm = false}:Param) => {
|
||||
}, [order])
|
||||
//对应单价
|
||||
const standardPrice = useCallback(price => {
|
||||
return formatPriceDiv(price, 100, true) + '/' + (order?.sale_mode == 1?'m':'kg')
|
||||
return formatPriceDiv(price) + '/' + (order?.sale_mode == 1?'m':'kg')
|
||||
}, [order])
|
||||
|
||||
//数量格式
|
||||
|
||||
@@ -13,6 +13,7 @@ import { formatPriceDiv } from "@/common/fotmat";
|
||||
import {alert} from "@/common/common"
|
||||
import { ORDER_STATUS, PAYMENT_METHOD, SUBSCRIPTION_MESSAGE_SCENE } from "@/common/enum";
|
||||
import { UseSubscriptionMessage } from "@/use/useCommon";
|
||||
import { throttle } from "@/common/util";
|
||||
|
||||
type Param = {
|
||||
show?: true|false,
|
||||
@@ -28,6 +29,8 @@ type OrderInfo = {
|
||||
status?: number, //订单状态
|
||||
payment_method?: number, //支付方式
|
||||
sale_mode?: number, //订单类型 0:大货 1剪板 2散剪
|
||||
actual_weight?: number, //实际重量
|
||||
estimate_weight?: number, //预估重量
|
||||
[val: string]: any
|
||||
}
|
||||
|
||||
@@ -99,7 +102,7 @@ export default memo(({show = false, onClose, orderInfo, onSubmitSuccess}:Param)
|
||||
//提交支付
|
||||
const {fetchData: submitFetchData} = SubmitOrderPayApi() //应收单提交
|
||||
const {fetchData: submitPrepayOrderFetchData} = SubmitPrepayOrderPayApi() //预付单提交
|
||||
const submitPay = async () => {
|
||||
const submitPay = throttle(async () => {
|
||||
if(submitData.payment_method === null) {
|
||||
alert.error('请选择支付方式')
|
||||
return false
|
||||
@@ -121,7 +124,7 @@ export default memo(({show = false, onClose, orderInfo, onSubmitSuccess}:Param)
|
||||
} else {
|
||||
alert.none(res.msg)
|
||||
}
|
||||
}
|
||||
}, 800)
|
||||
|
||||
//预付款
|
||||
const advance_payment = useMemo(() => {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0px 0px 12px 0px rgba(0,0,0,0.16);
|
||||
margin-bottom: 20px;;
|
||||
margin-bottom: 20px;
|
||||
.header{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -46,7 +46,7 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
|
||||
product_color_name: citem.name,
|
||||
num: citem.roll.toString(),
|
||||
length: (citem.length/100).toString(),
|
||||
weight: formatWeightDiv(citem.estimate_weight).toString(),
|
||||
weight: formatWeightDiv(citem.actual_weight||citem.estimate_weight).toString(),
|
||||
sale_price: formatPriceDiv(citem.sale_price).toString(),
|
||||
total_price: formatPriceDiv(citem.estimate_amount).toString(),
|
||||
})
|
||||
@@ -73,7 +73,7 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
|
||||
order_total_price: formatPriceDiv(orderInfo.total_sale_price).toString(), //订单价格
|
||||
order_total_num: (orderInfo.total_number) + '',
|
||||
qrcode:"", //跳转链接
|
||||
order_total_weight: formatWeightDiv(orderInfo.total_estimate_weight).toString(), //订单布匹重量
|
||||
order_total_weight: formatWeightDiv(orderInfo.total_weight||orderInfo.total_estimate_weight).toString(), //订单布匹重量
|
||||
list: lists ,
|
||||
show_qrcode: true //是否显示码单
|
||||
}))
|
||||
@@ -172,7 +172,7 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
|
||||
<View className={styles.scanPay_list}>
|
||||
{(state.loading)&&<LoadingCard/>||
|
||||
<ScrollView scrollY className={styles.scanPay_list}>
|
||||
<Image mode="widthFix" src={payCodeImage} showMenuByLongpress={true} onClick={showImage}></Image>
|
||||
<Image mode="widthFix" src={payCodeImage} onClick={showImage}></Image>
|
||||
</ScrollView>}
|
||||
</View>
|
||||
<View className={styles.btns} onClick={saveImageCheck}>保存电子确认单</View>
|
||||
|
||||
@@ -5,12 +5,10 @@ import styles from './index.module.scss'
|
||||
import Popup from "@/components/popup";
|
||||
import Taro from "@tarojs/taro";
|
||||
import { alert } from "@/common/common";
|
||||
import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatRemoveHashTag, formatWeightDiv } from "@/common/fotmat";
|
||||
import { formatDateTime, formatPriceDiv, formatRemoveHashTag, formatWeightDiv } from "@/common/fotmat";
|
||||
import useCheckAuthorize from "@/use/useCheckAuthorize";
|
||||
import { GetPayCode } from "@/api/onlinePay";
|
||||
import LoadingCard from "@/components/loadingCard";
|
||||
import { GetOrderPayApi, GetPrepayOrderPayApi } from "@/api/orderPay";
|
||||
|
||||
|
||||
type Param = {
|
||||
show?: true|false,
|
||||
@@ -52,7 +50,7 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
|
||||
product_color_name: citem.name,
|
||||
num: citem.roll.toString(),
|
||||
length: (citem.length/100).toString(),
|
||||
weight: formatWeightDiv(citem.estimate_weight).toString(),
|
||||
weight: formatWeightDiv(citem.actual_weight||citem.estimate_weight).toString(),
|
||||
sale_price: formatPriceDiv(citem.sale_price).toString(),
|
||||
total_price: formatPriceDiv(citem.total_sale_price||citem.estimate_amount).toString(),
|
||||
})
|
||||
@@ -79,7 +77,7 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
|
||||
order_total_price: formatPriceDiv(orderInfo.total_sale_price).toString(), //订单价格
|
||||
order_total_num: (orderInfo.total_number).toString(),
|
||||
qrcode:"", //跳转链接
|
||||
order_total_weight: formatWeightDiv(orderInfo.total_estimate_weight).toString(), //订单布匹重量
|
||||
order_total_weight: formatWeightDiv(orderInfo.total_weight||orderInfo.total_estimate_weight).toString(), //订单布匹重量
|
||||
list: lists
|
||||
}))
|
||||
}
|
||||
@@ -104,7 +102,6 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
|
||||
return addressInfo?.shipment_mode == 2? orderInfo.target_user_phone : orderInfo.take_goods_phone
|
||||
}
|
||||
|
||||
|
||||
//获取支付二维码
|
||||
const [payCodeImage, setPayCodeImage] = useState<string>('')
|
||||
const fileData = useRef({
|
||||
@@ -142,7 +139,7 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
|
||||
alert.loading('正在保存图片')
|
||||
Taro.saveImageToPhotosAlbum({
|
||||
filePath: fileData.current.filePath,
|
||||
success: function (res) {
|
||||
success: function () {
|
||||
alert.success('图片保存成功')
|
||||
},
|
||||
fail: function (err) {
|
||||
|
||||
Reference in New Issue
Block a user