ソースを参照

计算器优化

shish 2 ヶ月 前
コミット
0c4128aeca
2 ファイル変更12 行追加28 行削除
  1. 3 9
      ghsApp/src/admin/tools/calculator.vue
  2. 9 19
      hdApp/src/admin/tools/calculator.vue

+ 3 - 9
ghsApp/src/admin/tools/calculator.vue

@@ -1166,22 +1166,16 @@ export default {
 						const id = res.data.id
 						const orderSn = res.data.orderSn
 						const actPrice = res.data.actPrice != null ? res.data.actPrice : p
-						if (formPayload.hasPay == 0) {
+						if (Number(formPayload.hasPay) === 0) {
 							navigatedPay = true
 							this.$util.pageTo({
 								url: '/admin/billing/toPay',
 								type: 2,
 								query: { orderId: id, orderSn: orderSn, actPrice: actPrice },
 							})
-						} else {
-							navigatedPay = true
-							this.$util.pageTo({
-								url: '/admin/billing/result',
-								type: 2,
-								query: { orderId: id, orderSn: orderSn, title: '收款成功' },
-							})
 						}
-					} else if (!navigatedPay) {
+					}
+					if (!navigatedPay) {
 						uni.showToast({ title: '操作成功', icon: 'success' })
 					}
 					this.price = 0

+ 9 - 19
hdApp/src/admin/tools/calculator.vue

@@ -1230,25 +1230,15 @@ export default {
 					const orderSn = res.data && res.data.orderSn
 					const actPrice = res.data.actPrice != null ? res.data.actPrice : p
 					const statusVal = res.data && res.data.status
-					/** 扫码:仅当待支付时去付款页;非扫码:有订单即打开单成功页 */
-					if (id) {
-						if (Number(finalHasPay) === 0) {
-							if (Number(statusVal) === 1) {
-								navigatedPay = true
-								this.$util.pageTo({
-									url: '/admin/billing/toPay',
-									type: 2,
-									query: { orderId: id, orderSn: orderSn, actPrice: actPrice },
-								})
-							}
-						} else {
-							navigatedPay = true
-							this.$util.pageTo({
-								url: '/admin/billing/result',
-								type: 2,
-								query: { orderId: id, orderSn: orderSn, title: '收款成功' },
-							})
-						}
+					const fh = Number(finalHasPay)
+					/** 仅扫码 pending 去付款页;余额/线下/挂账成功不跳转成功页,toast 即可(对齐批发计算器体验) */
+					if (fh === 0 && Number(statusVal) === 1 && id) {
+						navigatedPay = true
+						this.$util.pageTo({
+							url: '/admin/billing/toPay',
+							type: 2,
+							query: { orderId: id, orderSn: orderSn, actPrice: actPrice },
+						})
 					}
 					if (!navigatedPay) {
 						uni.showToast({ title: '操作成功', icon: 'success' })