mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
重试订单退款
This commit is contained in:
@@ -6,10 +6,13 @@ import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.common.util.SecurityUtils;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.PileMerchantInfo;
|
||||
import com.jsowell.pile.dto.ApplyRefundDTO;
|
||||
import com.jsowell.pile.dto.ManualSettlementDTO;
|
||||
import com.jsowell.pile.dto.QueryMerchantOrderDTO;
|
||||
import com.jsowell.pile.dto.QueryOrderDTO;
|
||||
@@ -162,4 +165,24 @@ public class OrderBasicInfoController extends BaseController {
|
||||
public TableDataInfo getMerchantOrderList(@RequestBody QueryMerchantOrderDTO dto) {
|
||||
return getDataTable(orderBasicInfoService.getMerchantOrderInfoList(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 重试订单退款接口
|
||||
* http://localhost:8080/order/retryRefundOrder
|
||||
*/
|
||||
@PostMapping("/retryRefundOrder")
|
||||
public RestApiResponse<?> retryRefundOrder(@RequestBody ApplyRefundDTO dto) {
|
||||
RestApiResponse<?> response;
|
||||
try {
|
||||
orderBasicInfoService.retryRefundOrder(dto.getOrderCode());
|
||||
response = new RestApiResponse<>();
|
||||
} catch (BusinessException e) {
|
||||
logger.error("重试订单退款接口 error,", e);
|
||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("重试订单退款接口 error,", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,3 +68,12 @@ export function getMerchantOrderList(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 试订单退款接口
|
||||
export function retryRefundOrder(data) {
|
||||
return request({
|
||||
url: '/order/retryRefundOrder',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getOrder, manualSettlementOrder} from "@/api/order/order";
|
||||
import {getOrder, manualSettlementOrder, retryRefundOrder} from "@/api/order/order";
|
||||
import OrderEcharts from "@/views/order/order/orderEcharts";
|
||||
|
||||
export default {
|
||||
@@ -255,7 +255,7 @@ export default {
|
||||
components: {OrderEcharts},
|
||||
data() {
|
||||
return {
|
||||
orderList: this.$route.params.orderCode,
|
||||
orderCode: this.$route.params.orderCode,
|
||||
orderInfo: [],
|
||||
payDetail: [],
|
||||
// 订单退款列表
|
||||
@@ -315,6 +315,12 @@ export default {
|
||||
retryRefundOrder() {
|
||||
console.log("点击重试退款按钮");
|
||||
alert("重试退款功能未完成");
|
||||
var param = {
|
||||
orderCode: this.orderCode
|
||||
};
|
||||
retryRefundOrder(param).then(response => {
|
||||
this.getOrderDetail();
|
||||
});
|
||||
},
|
||||
confirmManualSettlement() {
|
||||
if (this.manualSettlementParam.chargingAmount == null) {
|
||||
@@ -331,9 +337,7 @@ export default {
|
||||
})
|
||||
},
|
||||
async getOrderDetail() {
|
||||
// console.log("主页面传递过来的参数", this.orderList);
|
||||
// console.log(this.orderList.orderCode)
|
||||
const {data} = await getOrder(this.orderList);
|
||||
const {data} = await getOrder(this.orderCode);
|
||||
// console.log("getOrder", data);
|
||||
this.obj = data;
|
||||
this.orderInfo = [data.orderInfo];
|
||||
|
||||
Reference in New Issue
Block a user