shish 2 meses atrás
pai
commit
8f23080696

+ 4 - 0
hdApp/src/admin/billing/result.vue

@@ -3,6 +3,7 @@
     <appResult>
 		<button class="admin-button-com blue big" @click="gotoDetail">订单详情</button>
 		<button class="admin-button-com blue big" @click="sendWork" v-if="orderInfo.hasWork!=1">通知制作</button>
+		<button class="admin-button-com blue big" @click="gotoCalculator">计算器</button>
 		<button class="admin-button-com big" @click="gotoPlace">返回</button>
 
 		<!-- #ifdef MP-WEIXIN -->
@@ -50,6 +51,9 @@ export default {
 		gotoDetail() {
 			this.pageTo({url:`/admin/order/detail?id=${this.option.orderId}`, type: 2})
 		},
+		gotoCalculator() {
+			this.pageTo({ url: '/admin/tools/calculator', type: 2 })
+		},
 		gotoPlace() {
 			uni.navigateBack({ delta: 1 })
 		}

+ 21 - 13
hdApp/src/admin/tools/calculator.vue

@@ -1124,7 +1124,10 @@ export default {
 			this.checkType = 0
 		},
 		submitCashierPay() {
-			this._submitCashierPayCore(false)
+			const that = this
+			this.$util.confirmModal({ title: '提示', content: '确认提交?' }, () => {
+				that._submitCashierPayCore(false)
+			})
 		},
 		_submitCashierPayCore(forceBalancePay) {
 			if (!forceBalancePay) {
@@ -1222,17 +1225,21 @@ export default {
 						return
 					}
 					let navigatedPay = false
-					if (res.data && res.data.status == 1) {
-						const id = res.data.id
-						const orderSn = res.data.orderSn
-						const actPrice = res.data.actPrice != null ? res.data.actPrice : p
-						if (finalHasPay == 0) {
-							navigatedPay = true
-							this.$util.pageTo({
-								url: '/admin/billing/toPay',
-								type: 2,
-								query: { orderId: id, orderSn: orderSn, actPrice: actPrice },
-							})
+					const id = res.data && res.data.id
+					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({
@@ -1241,7 +1248,8 @@ export default {
 								query: { orderId: id, orderSn: orderSn, title: '收款成功' },
 							})
 						}
-					} else if (!navigatedPay) {
+					}
+					if (!navigatedPay) {
 						uni.showToast({ title: '操作成功', icon: 'success' })
 					}
 					this.price = 0