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

This commit is contained in:
2022-11-16 17:52:51 +08:00
parent 24773447e9
commit 4302a8fa67
5 changed files with 49 additions and 13 deletions
+10 -5
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(), //总空差重量
}))
@@ -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(), //总空差重量
}))
@@ -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,
}))