bding 1 year ago
parent
commit
706d61b6c6

+ 6 - 3
src/api/modules/contractApi.js

@@ -251,13 +251,16 @@ const contractInterface={
 	},
 	// 退款
 	orderRefund:params=>{
-		return http.psst('/cygx/order/refund',params)
+		return http.post('/cygx/order/refund',params)
 	},
 	// 退款记录
 	orderRefundList:params=>{
-		return http.psst('/cygx/order/refund/list',params)
+		return http.get('/cygx/order/refund/list',params)
+	},
+	// 退款撤销接口
+	refundRevokeOrder:params=>{
+		return http.get('/cygx/order/refund_revoke',params)
 	},
-	
 }
 
 export {

+ 1 - 1
src/views/contract_manage/paymentRecords.vue

@@ -217,7 +217,6 @@ export default {
     // 退款的确认弹框
     async refundDialogHandlerVisible() {
       if (!this.refundTextarea) return this.$message.warning("退款原因不能为空");
-      // 等待接口
       const res = await contractInterface.orderRefund({
         OrderCode: this.orderRefundCode,
         Remark: this.refundTextarea,
@@ -225,6 +224,7 @@ export default {
       if (res.Ret === 200) {
         this.$message.success("操作成功");
         this.handleClose();
+        this.getOrderList();
       }
     },
   },

+ 20 - 13
src/views/contract_manage/refundRecord.vue

@@ -34,7 +34,7 @@
           <el-option v-for="item in paymentProjectList" :key="item" :label="item" :value="item"> </el-option>
         </el-select>
         <el-select @change="handleSelectChange" style="margin-right: 20px; width: 220px" v-model="payStatus" placeholder="退款状态" clearable>
-          <!-- <el-option v-for="item in tradeArr" :key="item.IndustryId" :label="item.IndustryName" :value="item.IndustryId"> </el-option> -->
+          <el-option v-for="item in payStatusList" :key="item.key" :label="item.lable" :value="item.key"> </el-option>
         </el-select>
         <el-input @input="handleSelectChange" style="margin-right: 20px; width: 220px" prefix-icon="el-icon-search" v-model="orderNumber" placeholder="请输入退款单号" />
 
@@ -59,7 +59,7 @@
     </el-card>
 
     <el-dialog center v-dialogDrag title="退款" :visible.sync="dialogVisible" append-to-body width="30%" :before-close="handleClose">
-      <div>
+      <div style="margin-bottom: 30px">
         {{ refundTextarea }}
       </div>
     </el-dialog>
@@ -87,6 +87,12 @@ export default {
       tabs_index: 1,
       timeRange: [], // 时间筛选
       sales: [],
+      payStatusList: [
+        { lable: "退款异常", key: 5 },
+        { lable: "退款成功", key: 3 },
+        { lable: "退款处理中", key: 4 },
+        { lable: "退款关闭", key: 6 },
+      ],
       salesArr: [], //销售
       defaultSalesProps: {
         multiple: true,
@@ -153,7 +159,6 @@ export default {
         this.tableOrderData = res.Data.List;
         this.total = res.Data.Paging.Totals || 0;
       }
-      console.log(res);
     },
     tabActive(item) {
       if (this.tabs_index == item.key) return;
@@ -212,17 +217,19 @@ export default {
         type: "warning",
       })
         .then(() => {
-          this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
+          contractInterface
+            .refundRevokeOrder({
+              OrderCode: row.OrderCode,
+            })
+            .then(() => {
+              this.getOrderRefundList();
+              this.$message({
+                type: "success",
+                message: "操作成功!",
+              });
+            });
         })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "已取消删除",
-          });
-        });
+        .catch(() => {});
     },
     // 退款的确认弹框
     async refundDialogHandlerVisible() {