shish 4 سال پیش
والد
کامیت
e29a9acba5
2فایلهای تغییر یافته به همراه14 افزوده شده و 20 حذف شده
  1. 2 14
      ghsApp/src/admin/billing/affirm.vue
  2. 12 6
      ghsApp/src/pagesOrder/refund.vue

+ 2 - 14
ghsApp/src/admin/billing/affirm.vue

@@ -98,22 +98,12 @@
             <input type="number" placeholder="请填写,留空免运费" v-model="form.sendCost" placeholder-class="tui-placeholder"/>
           </tui-list-cell>
 
-<!-- #ifdef MP-WEIXIN -->
           <tui-list-cell class="line-cell" :hover="false" :arrow="false">
             <view class="tui-title">结账方式</view>
+            <!-- <button @click="form.hasPay = 0" class="admin-button-com mini-btn" :class="form.hasPay == 0 ? 'blue' : 'default'">待付款</button> -->
             <button @click="form.hasPay = 2" class="admin-button-com mini-btn" :class="form.hasPay == 2 ? 'blue' : 'default'">欠款</button>
             <button @tap="form.hasPay = 1" class="admin-button-com mini-btn" :class="form.hasPay == 1 ? 'blue' : 'default'">已付款</button>
           </tui-list-cell>
-<!-- #endif -->
-
-<!-- #ifdef APP-PLUS -->
-          <tui-list-cell class="line-cell" :hover="false" :arrow="false">
-            <view class="tui-title">结账方式</view>
-            <button @click="form.hasPay = 0" class="admin-button-com mini-btn" :class="form.hasPay == 0 ? 'blue' : 'default'">待付款</button>
-            <button @tap="form.hasPay = 1" class="admin-button-com mini-btn" :class="form.hasPay == 1 ? 'blue' : 'default'">已付款</button>
-            <button @click="form.hasPay = 2" class="admin-button-com mini-btn" :class="form.hasPay == 2 ? 'blue' : 'default'">欠款</button>
-          </tui-list-cell>
-<!-- #endif -->
 
           <tui-list-cell class="line-cell" :arrow="true" v-if="form.hasPay == 1">
             <div class="tui-title">收款方式</div>
@@ -258,10 +248,8 @@ export default {
   },
   onLoad (option) {
 
-    // #ifdef MP-WEIXIN
-    //如果在微信端,默认欠款是首选项
+    //默认欠款是首选项
     this.form.hasPay = 2
-    // #endif
 
     this.kdType = option.kdType
 

+ 12 - 6
ghsApp/src/pagesOrder/refund.vue

@@ -37,10 +37,14 @@
 		</view>
 		<view class="flex refund-item">
 			<view class="refund-label">可退金额:</view>
-			<view class="list">¥{{coundRefundPrice}}</view>
+			<view class="list">¥{{couldRefundPrice}}</view>
 		</view>
 		<view class="flex refund-item">
-			<view class="refund-label"><text></text>退款金额:</view>
+			<view class="refund-label">合计退款:</view>
+			<view class="list">¥{{refundPrice}}</view>
+		</view>
+		<view class="flex refund-item">
+			<view class="refund-label"><text></text>实际退款:</view>
 			<input type="digit" v-model="refundMoney">
 		</view>
 		<view class="refund-item">
@@ -72,13 +76,14 @@ export default {
 			refundType:1,
 			remark:'',
 			orderInfo:{},
-			coundRefundPrice:0
+			couldRefundPrice:0
 		};
 	},
 	onShow() {
 	},
 	computed:{
 		refundPrice(){
+			console.log('tttt')
 			let price = 0
 			if(this.product){
 				for (const item of this.product) {
@@ -90,6 +95,7 @@ export default {
 					}
 				}
 			}
+			price = parseFloat(price.toFixed(2))
 			this.refundMoney = price
 			return price
 		}
@@ -141,9 +147,9 @@ export default {
 			const res = await getDetail({ id: this.option.id,getOriginalItem:1 })
 			this.orderInfo = res.data
 			
-			this.coundRefundPrice = Number(res.data.orderPrice) - Number(res.data.tkPrice)
-			this.coundRefundPrice = this.coundRefundPrice.toFixed(2)
-			this.coundRefundPrice = parseFloat(this.coundRefundPrice)
+			this.couldRefundPrice = Number(res.data.orderPrice) - Number(res.data.tkPrice)
+			this.couldRefundPrice = this.couldRefundPrice.toFixed(2)
+			this.couldRefundPrice = parseFloat(this.couldRefundPrice)
 
 			this.product = res.data.product.map(ele=>{
 				return {...ele,refundCount:null}