This commit is contained in:
weipengfei 2024-05-30 15:40:28 +08:00
parent b10fe4c605
commit 96a3a2ef8d
2 changed files with 8 additions and 5 deletions

View File

@ -104,10 +104,10 @@ const handleEnter = () => {
auth_code: input.value, auth_code: input.value,
}) })
.then((res) => { .then((res) => {
if (res.data.trade_state == "SUCCESS") { if (res.data.out_trade_no && res.msg == "支付成功") {
drawer.value = false; drawer.value = false;
ElMessage({ ElMessage({
message: res.data.trade_state_desc || "支付成功", message: "支付成功",
type: "success", type: "success",
}); });
// if(res.data.message) audioplay(res.data.message); // if(res.data.message) audioplay(res.data.message);
@ -173,10 +173,10 @@ const orderPay = (id) => {
}; };
orderPayApi(id, query) orderPayApi(id, query)
.then((res) => { .then((res) => {
if (res.data.trade_state == "SUCCESS") { if (res.data.out_trade_no && res.msg == "支付成功") {
drawer.value = false; drawer.value = false;
ElMessage({ ElMessage({
message: res.message == "success" ? "支付成功" : res.message, message: "支付成功",
type: "success", type: "success",
}); });
// if(res.data.message) audioplay(res.data.message); // if(res.data.message) audioplay(res.data.message);

View File

@ -139,6 +139,9 @@ const onPrint = (data)=>{
total: item.goods_total_price, // total: item.goods_total_price, //
}); });
}); });
let paytype = "现金支付";
if(data.pay_type==13) paytype = "支付宝支付";
if(data.pay_type==9) paytype = "微信支付";
let obj = { let obj = {
mer_name: userStore.userInfo.merchant.mer_name, // mer_name: userStore.userInfo.merchant.mer_name, //
service_phone: userStore.userInfo.merchant.service_phone, // service_phone: userStore.userInfo.merchant.service_phone, //
@ -146,7 +149,7 @@ const onPrint = (data)=>{
create_time: data.create_time, // create_time: data.create_time, //
total_price: orderForm.value.total, // total_price: orderForm.value.total, //
pay_price: orderForm.value.total, // pay_price: orderForm.value.total, //
pay_type: data.trade_type=='MICROPAY' ? '微信支付':'余额支付', // pay_type: paytype, //
pay_number: data.transaction_id, // pay_number: data.transaction_id, //
goods: goods, // goods: goods, //
}; };