shish 2 лет назад
Родитель
Сommit
f772ae49b1

+ 1 - 0
ghsApp/src/admin/changePrice/changeClass.vue

@@ -187,6 +187,7 @@ export default {
 						that.cancelModifyClass()
 						that.$msg(res.msg)
 						that.initProduct()
+						that.currentList = []
 					}
 				})
 			})

+ 4 - 0
ghsApp/src/api/refund/index.js

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const modifyAmount = data => {
+	return https.get('/refund/modify-amount', data)
+}
+
 export const modifyCause = data => {
 	return https.get('/refund/modify-cause', data)
 }

+ 41 - 3
ghsApp/src/pagesOrder/refundDetail.vue

@@ -26,7 +26,10 @@
 		</view>
 		<view class="flex refund-item">
 			<view class="refund-label"><text></text>退款金额:</view>
-			<view class="list" style="font-size:28upx;">¥{{refundPrice}}</view>
+			<view class="list" style="font-size:28upx;">
+				¥{{refundPrice}}
+				<text style="margin-left:80upx;color:#3385FF;" @click="changeAmount()" v-if="info.status == 0">修改</text>
+			</view>
 		</view>
 		<view class="flex refund-item">
 			<view class="refund-label"><text></text>退款状态:</view>
@@ -76,10 +79,21 @@
 			</view>
 		</uni-popup>
 
+		<uni-popup ref="modifyAmountRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+			<view style="padding:60upx;">
+				<input type="digit" placeholder="请填写金额" v-model="refundAmount" @focus="refundAmount=''" placeholder-class="tui-placeholder" 
+				style="width:500upx;text-align:center;border:1upx solid #DDDDDD;height:90upx;line-height:90upx;font-size:26upx;"/>
+				<view style="text-align:center;">
+					<button class="admin-button-com big default" style="margin:30upx auto 10upx auto;width:45%;" @click="cancelChange()">取消</button>
+					<button class="admin-button-com big blue" style="margin:30upx auto 10upx 20upx;width:45%;" @click="confirmChange()">确认</button>
+				</view>
+			</view>
+		</uni-popup>
+
 	</view>
 </template>
 <script>
-import { refundDetail,passRefund,rejectRefund,modifyCause } from "@/api/refund";
+import { refundDetail,passRefund,rejectRefund,modifyCause,modifyAmount } from "@/api/refund";
 export default {
 	data() {
 		return {
@@ -89,7 +103,8 @@ export default {
 			remark:'',
 			info:[],
 			rejectReason:'',
-			from:0
+			from:0,
+			refundAmount:''
 		};
 	},
 	onLoad() {
@@ -98,6 +113,29 @@ export default {
 		}
 	},
 	methods: {
+		cancelChange(){
+			this.refundAmount = ''
+			this.$refs.modifyAmountRef.close()
+		},
+		confirmChange(){
+			if(Number(this.refundAmount)<=0){
+				this.$msg('请填写金额')
+				return false
+			}
+			this.$util.confirmModal({content:'确认修改?'},() => {
+				let that = this
+				this.$refs.modifyAmountRef.close()
+				modifyAmount({id:this.info.id,amount:this.refundAmount}).then(res=>{
+					if(res.code == 1){
+						that.$msg(res.msg)
+						that.init()
+					}
+				})
+			})
+		},
+		changeAmount(){
+			this.$refs.modifyAmountRef.open('center')
+		},
 		changeCause(info){
 			this.$util.confirmModal({content:'确认变更?'},() => {
 				let that = this