feat(ID1000713添加控制码单价格显示功能):

This commit is contained in:
czm 2022-11-16 17:37:02 +08:00
parent 24773447e9
commit 4302a8fa67
5 changed files with 49 additions and 13 deletions

View File

@ -2,7 +2,7 @@ import { CAP_HTML_TO_IMAGE_BASE_URL } from '@/common/constant'
import { useRequest } from '@/use/useHttp'
/**
* 线
* 线线
*/
export const GetPayCode = () => {
return useRequest({
@ -12,6 +12,15 @@ export const GetPayCode = () => {
})
}
//本地获取二维码
// export const GetPayCode = () => {
// return useRequest({
// url: `/caphtml`,
// base_url: CAP_HTML_TO_IMAGE_BASE_URL,
// method: 'post',
// })
// }
/**
* 退
*/
@ -22,3 +31,12 @@ export const GetReturnPayCode = () => {
method: 'post',
})
}
// 本地获取退款码单
// export const GetReturnPayCode = () => {
// return useRequest({
// url: `/caphtml-return`,
// base_url: CAP_HTML_TO_IMAGE_BASE_URL,
// method: 'post',
// })
// }

View File

@ -1,4 +1,4 @@
// export const BASE_URL = CURRENT_BASE_URL
export const BASE_URL = CURRENT_BASE_URL
// export const BASE_URL = `http://192.168.0.75:50001/lymarket`
// export const BASE_URL = `http://192.168.0.89:50001/lymarket`
// export const BASE_URL = `http://10.0.0.5:50001/lymarket`
@ -14,7 +14,7 @@
// export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞
// export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添
// export const BASE_URL = `http://192.168.1.22:50002/lymarket` // 婷
export const BASE_URL = `http://192.168.1.42:50002/lymarket` // 杰
// export const BASE_URL = `http://192.168.1.42:50002/lymarket` // 杰
// CDN
// 生成密钥
@ -27,6 +27,7 @@ export const IMG_CND_Prefix = CURRENT_ENV.includes('production') ? 'https://cdn.
//在线支付图片baseUrl
export const CAP_HTML_TO_IMAGE_BASE_URL = CURRENT_ENV.includes('production') ? 'https://www.zzfzyc.com' : 'https://test.zzfzyc.com'
// export const CAP_HTML_TO_IMAGE_BASE_URL = CURRENT_ENV.includes('production') ? 'https://www.zzfzyc.com' : 'http://192.168.1.127:8082'
// 上传图片视频
export const CDN_UPLOAD_IMG = `${UPLOAD_CDN_URL || ''}`

View File

@ -29,6 +29,8 @@ type ListParam = {
sale_price: string
total_price: string
weight_error: string
show_sale_price: boolean
show_total_price: boolean
}
export default memo(({ show = true, onClose, company, orderInfo }: Param) => {
const [detail, setDetail] = useState<any>()
@ -47,7 +49,9 @@ export default memo(({ show = true, onClose, company, orderInfo }: Param) => {
length: (citem.length / 100).toString(),
weight: formatWeightDiv(citem.actual_weight || citem.estimate_weight).toString(),
sale_price: formatPriceDiv(citem.sale_price).toString(),
show_sale_price: orderInfo.is_display_price,
total_price: formatPriceDiv(citem.total_sale_price || citem.estimate_amount).toString(), //小计
show_total_price: orderInfo.is_display_price,
weight_error: formatWeightDiv(citem.weight_error).toString(),
})
})
@ -71,21 +75,22 @@ export default memo(({ show = true, onClose, company, orderInfo }: Param) => {
phone: userPhone(orderInfo), //收货手机号码
order_total_length: (orderInfo.total_number / 100).toString(), //订单布匹长度
order_total_price: formatPriceDiv(orderInfo.bill_total_sale_price).toString(), //订单价格
show_order_total_price: orderInfo.is_display_price,
order_total_num: orderInfo.total_number + '',
qrcode: `${PAY_H5_CODE_URL}?sale_order_no=${orderInfo.order_no}`, //跳转链接
order_total_weight: formatWeightDiv(orderInfo.total_weight || orderInfo.total_estimate_weight).toString(), //订单布匹重量
list: lists,
show_qrcode: true, //是否显示码单
estimate_amount: formatPriceDiv(orderInfo.estimate_amount).toString(),
show_estimate_amount: orderInfo.estimate_amount > 0 && orderInfo.total_sale_price <= 0,
show_estimate_amount: orderInfo.estimate_amount > 0 && orderInfo.total_sale_price <= 0 && orderInfo.is_display_price,
total_sale_price: formatPriceDiv(orderInfo.total_sale_price).toString(),
show_total_sale_price: orderInfo.total_sale_price > 0,
show_total_sale_price: orderInfo.total_sale_price > 0 && orderInfo.is_display_price,
total_weight_error_discount: formatPriceDiv(orderInfo.total_weight_error_discount).toString(),
show_total_weight_error_discount: orderInfo.total_weight_error_discount > 0,
show_total_weight_error_discount: orderInfo.total_weight_error_discount > 0 && orderInfo.is_display_price,
actual_amount: formatPriceDiv(orderInfo.actual_amount).toString(),
show_actual_amount: orderInfo.actual_amount > 0,
show_actual_amount: orderInfo.actual_amount > 0 && orderInfo.is_display_price,
wait_pay_amount: formatPriceDiv(orderInfo.wait_pay_amount).toString(),
show_wait_pay_amount: orderInfo.wait_pay_amount > 0,
show_wait_pay_amount: orderInfo.wait_pay_amount > 0 && orderInfo.is_display_price,
show_barcode: true,
order_total_weight_error: formatWeightDiv(orderInfo.total_weight_error).toString(), //总空差重量
}))

View File

@ -28,6 +28,8 @@ type ListParam = {
sale_price: string
total_price: string
weight_error: string
show_sale_price: boolean
show_total_price: boolean
}
export default memo(({ show = true, onClose, company, orderInfo }: Param) => {
const [detail, setDetail] = useState<any>()
@ -52,7 +54,9 @@ export default memo(({ show = true, onClose, company, orderInfo }: Param) => {
length: (citem.length / 100).toString(),
weight: formatWeightDiv(citem.actual_weight || citem.estimate_weight).toString(),
sale_price: formatPriceDiv(citem.sale_price).toString(),
show_sale_price: orderInfo.is_display_price,
total_price: formatPriceDiv(citem.total_sale_price || citem.estimate_amount).toString(), //小计
show_total_price: orderInfo.is_display_price,
weight_error: formatWeightDiv(citem.weight_error).toString(),
})
})
@ -82,15 +86,15 @@ export default memo(({ show = true, onClose, company, orderInfo }: Param) => {
list: lists,
estimate_amount: formatPriceDiv(orderInfo.estimate_amount).toString(),
show_estimate_amount: orderInfo.estimate_amount > 0 && orderInfo.total_sale_price <= 0,
show_estimate_amount: orderInfo.estimate_amount > 0 && orderInfo.total_sale_price <= 0 && orderInfo.is_display_price,
total_sale_price: formatPriceDiv(orderInfo.total_sale_price).toString(),
show_total_sale_price: orderInfo.total_sale_price > 0,
show_total_sale_price: orderInfo.total_sale_price > 0 && orderInfo.is_display_price,
total_weight_error_discount: formatPriceDiv(orderInfo.total_weight_error_discount).toString(),
show_total_weight_error_discount: orderInfo.total_weight_error_discount > 0,
show_total_weight_error_discount: orderInfo.total_weight_error_discount > 0 && orderInfo.is_display_price,
actual_amount: formatPriceDiv(orderInfo.actual_amount).toString(),
show_actual_amount: orderInfo.actual_amount > 0,
show_actual_amount: orderInfo.actual_amount > 0 && orderInfo.is_display_price,
wait_pay_amount: formatPriceDiv(orderInfo.wait_pay_amount).toString(),
show_wait_pay_amount: orderInfo.wait_pay_amount > 0,
show_wait_pay_amount: orderInfo.wait_pay_amount > 0 && orderInfo.is_display_price,
show_barcode: true,
order_total_weight_error: formatWeightDiv(orderInfo.total_weight_error).toString(), //总空差重量
}))

View File

@ -31,6 +31,9 @@ type ListParam = {
deduction_weight: string
settle_weight: string
deduction_amount: string
show_sale_price: boolean
show_total_price: boolean
show_deduction_amount: boolean
}
export default memo(({ show = true, onClose, orderInfo }: Param) => {
const [detail, setDetail] = useState<any>()
@ -56,11 +59,14 @@ export default memo(({ show = true, onClose, orderInfo }: Param) => {
length: (citem.length / 100).toString(),
weight: formatWeightDiv(citem.label_weight).toString(),
sale_price: formatPriceDiv(citem.sale_price).toString(),
show_sale_price: orderInfo.is_display_price,
total_price: formatPriceDiv(citem.refund_amount).toString(), //小计
show_total_price: orderInfo.is_display_price,
weight_error: formatWeightDiv(citem.settle_weight_error).toString(),
deduction_weight: formatWeightDiv(citem.deductions_weight).toString(),
settle_weight: formatWeightDiv(citem.settle_weight).toString(),
deduction_amount: formatPriceDiv(citem.deductions_amount).toString(),
show_deduction_amount: orderInfo.is_display_price,
})
})
})
@ -75,10 +81,12 @@ export default memo(({ show = true, onClose, orderInfo }: Param) => {
bank_name: orderInfo.bank_of_deposit,
order_total_length: (orderInfo.total_number / 100).toString(),
order_total_price: formatPriceDiv(orderInfo.refund_amount).toString(),
show_order_total_price: orderInfo.is_display_price,
order_total_num: orderInfo.total_number.toString(),
order_total_settle_weight: formatWeightDiv(orderInfo.order_total_settle_weight).toString(),
order_total_deduction_weight: formatWeightDiv(orderInfo.order_total_deduction_weight).toString(),
order_total_deduction_amount: formatPriceDiv(orderInfo.order_total_deduction_amount).toString(),
show_order_total_deduction_amount: orderInfo.is_display_price,
order_total_weight_error: formatWeightDiv(orderInfo.total_weight_error).toString(),
list: lists,
}))