caichengyu 7 달 전
부모
커밋
b2f60b1989

+ 16 - 0
src/newApi/order.js

@@ -32,6 +32,22 @@ export default {
             params: data
         })
     },
+     //接口订单审核
+     apiOrderCheck(data) {
+        return request({
+            url: '/order/refund/api/check',
+            method: 'post',
+            data
+        })
+    },
+    //接口订单关闭
+    apiOrderCloseOrderGoods(data) {
+       return request({
+           url: '/order/goods/closeOrderGoods',
+           method: 'post',
+           data
+       })
+   },
     //查询复购冲突订单列表
     inquireOrderrebuyListList(data) {
         return request({

+ 2 - 2
src/utils/request.js

@@ -8,9 +8,9 @@ import { paramMate } from "@/utils/common";
 
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
-// export const baseURL = process.env.VUE_APP_BASE_API
+export const baseURL = process.env.VUE_APP_BASE_API
 // export const baseURL = 'https://cloud.xyyxt.net/'
-export const baseURL = 'http://192.168.1.123:5030'
+// export const baseURL = 'http://192.168.1.123:5030'
 export const BASE_IMG_URL = process.env.VUE_APP_IMG_API
 // export const BASE_IMG_URL = 'https://file.xyyxt.net'
 const service = axios.create({

+ 168 - 1
src/views/Marketing/order/orderList/apiorder.vue

@@ -26,10 +26,19 @@
       @emitData="emitData"
       rowKey="orderSn"
     >
+    <template
+        slot="customize"
+      >
+      <el-button size="small" type="success" @click="moreAudit"
+          >批量审核</el-button
+        >
+      </template>
       <template slot="btn" slot-scope="props">
         <el-button type="text" @click="jumpDetail(props.scope.row)"
           >订单收费信息</el-button
         >
+        <el-button v-if="props.scope.row.refundStatus===1" type="text" @click="audit(props.scope.row)">审核</el-button> 
+        <el-button  type="text" @click="btnclose(props.scope.row)">订单关闭</el-button> 
         <!-- <el-button type="text" @click="del(props.scope.row)">删除</el-button> -->
       </template>
     </table-list>
@@ -40,6 +49,45 @@
       @handleSizeChange="handleSizeChange"
       @handleCurrentChange="handleCurrentChange"
     />
+  <div>
+    <el-dialog
+  title="退款审核"
+  :visible.sync="dialogVisible"
+  width="40%"
+  :before-close="handleClose">
+  <el-form ref="form" :model="form" label-width="110px">
+  
+  <el-form-item label="审核结果">
+    <el-radio-group v-model="form.checkResult" >
+      <el-radio label="1">通过</el-radio>
+      <el-radio label="2">不通过</el-radio>
+    </el-radio-group>
+  </el-form-item>
+  <el-form-item label="审核备注说明">
+    <el-input type="textarea" v-model="form.checkMsg"></el-input>
+  </el-form-item>
+</el-form>
+  <span slot="footer" class="dialog-footer">
+    <el-button @click="dialogVisible = false">取 消</el-button>
+    <el-button type="primary" @click="saveaudit">确 定</el-button>
+  </span>
+</el-dialog>
+    <el-dialog
+  title="订单关闭"
+  :visible.sync="dialogVisible"
+  width="40%"
+  :before-close="handleClose">
+  <el-form ref="form" :model="form2" label-width="110px">
+  
+  <el-form-item label="关闭原因">
+    <el-input type="textarea" v-model="form2.closeReason"></el-input>
+  </el-form-item>
+</el-form>
+  <span slot="footer" class="dialog-footer">
+    <el-button @click="dialogVisible = false">取 消</el-button>
+    <el-button type="primary" @click="saveclose">确 定</el-button>
+  </span>
+</el-dialog></div>
   </div>
 </template>
 
@@ -65,8 +113,12 @@ export default {
         backFatherBtn: {
           status: false,
           title: "计费单收费",
-        },
+        }
       },
+        dialogVisible:false,
+        auditData:[],
+        form:{checkResult:'1',checkMsg:''},
+        form2:{closeReason:''},
       topType: true,
       //搜索
       formList: [
@@ -147,6 +199,29 @@ export default {
             },
           ],
         },
+        {
+          prop: "refundStatus",
+          placeholder: "退款状态",
+          scope: "select",
+          options: [
+            {
+              label: "正常",
+              value: 0,
+            },
+            {
+              label: "退款中",
+              value: 1,
+            },
+            {
+              label: "已退款",
+              value: 2,
+            },
+            {
+              label: "拒绝退款",
+              value: 3,
+            },
+          ],
+        },
         // {
         //   placeholder: "订单来源",
         //   prop: "orderFroms",
@@ -228,6 +303,30 @@ export default {
           hidden: true,
           width: "280px",
         },
+        {
+          label: "退款状态",
+          prop: "refundStatus",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "退款中",
+              value: 1,
+            },
+            {
+              label: "已退款",
+              value: 2,
+            },
+            {
+              label: "拒绝退款",
+              value: 3,
+            },
+            {
+              label: "正常",
+              value: 0,
+            },
+          ],
+        },
         {
           label: "商品业务层级",
           prop1: "educationName",
@@ -425,6 +524,74 @@ export default {
     this.$refs.tableList.allCheckData = [];
   },
   methods: {
+    btnclose(row){
+      this.$prompt('请输入关闭原因', '订单关闭', {
+          confirmButtonText: '确定关闭',
+          cancelButtonText: '取消',
+        }).then(({ value }) => {
+      var postdata={orderSn:row.orderSn,orderGoodsId:row.orderGoodsId,status:0,closeReason:value}
+          this.$api
+        .apiOrderCloseOrderGoods(postdata)
+        .then((res) => {
+          this.$message.success("提交成功");
+          this.dialogVisible=false;
+          this.search();
+        })
+        .catch((err) => {
+          this.$message.error(err.msg);
+        });
+        }).catch(() => {
+          // this.$message({
+          //   type: 'info',
+          //   message: '取消输入'
+          // });       
+        });
+    },
+    moreAudit(){
+      if (this.$refs.tableList.allCheckData.length == 0) {
+        this.$message.error("请勾选需要批量操作的订单");
+        return;
+      }
+      var cL = this.$refs.tableList.allCheckData.filter(
+        (f) => f.refundStatus === 1
+      );
+      console.log("231", cL);
+      var ids = cL.map((item) => {
+        return {orderSn:item.orderSn,orderGoodsId:item.orderGoodsId,checkResult:0,checkMsg:''};
+      });
+      if (ids.length==0) {
+        this.$message.error("请勾选待审核的订单");
+        return;
+      }
+      this.auditData=ids;
+      this.form={checkResult:"1",checkMsg:''};
+      this.dialogVisible=true;
+    },
+    audit(row) {
+      this.auditData=[{orderSn:row.orderSn,orderGoodsId:row.orderGoodsId,checkResult:0,checkMsg:''}];
+      this.form={checkResult:"1",checkMsg:''};
+      this.dialogVisible=true;
+    },
+    saveaudit() {
+      if(this.form.checkResult==2&&this.form.checkMsg=='')
+      {
+        this.$message.error("请输入不通过的原因");
+        return;
+      }
+      const postdata = this.auditData.map(user => ({ ...user, checkResult:parseInt(this.form.checkResult),checkMsg:this.form.checkMsg }));
+      console.log(postdata, "data");
+      
+      this.$api
+        .apiOrderCheck(postdata)
+        .then((res) => {
+          this.$message.success("提交成功");
+          this.dialogVisible=false;
+          this.search();
+        })
+        .catch((err) => {
+          this.$message.error(err.msg);
+        });
+    },
     exportorder(){
       let arr = JSON.parse(JSON.stringify(this.formData));
       delete arr.pageNum

+ 10 - 4
src/views/education/classManageMent/classHoursReview/component/LessonTable.vue

@@ -265,7 +265,7 @@
               </div>
             </div>
           </div>
-          <span v-else> {{ scope2.row[item.prop] +scope2.row.abnormalSign }} </span>
+          <span v-else> {{ scope2.row[item.prop] }}</span>
         </template>
       </el-table-column>
     </el-table>
@@ -298,8 +298,14 @@ export default {
         return false;
       },
     },
+    erJianErZao222: {
+      type: Boolean,
+      default: () => {
+        return false;
+      },
+    },
   },
-  inject: ["getPeriodStatus", "getUserInfo", "getAllIds"],
+  inject: ["getPeriodStatus", "getUserInfo", "getAllIds","getShowRedBackg"],
   data() {
     return {
       tableSet: [
@@ -402,8 +408,8 @@ export default {
   },
   methods: {
     setRowStyle({row, rowIndex}) {
-      console.log(row)
-      if (row.abnormalSign==1) { // 例如,根据某条件判断
+      // console.log(row,this.getShowRedBackg())
+      if (row.abnormalSign==1&&this.getShowRedBackg()) { // 例如,根据某条件判断
         return { backgroundColor: 'rgb(231 60 60)',color:'#ffffff' }; // 自定义背景颜色
       }
       return {}; // 默认样式或无样式返回空对象

+ 1 - 0
src/views/education/classManageMent/classHoursReview/component/StudyTables.vue

@@ -223,6 +223,7 @@ export default {
       getPeriodStatus: () => this.periodStatus,
       getUserInfo: this.getUserInfo,
       getAllIds: () => this.allIds,
+      getShowRedBackg: () => this.setData.showRedBackg||false,
     };
   },
   data() {

+ 1 - 0
src/views/education/classManageMent/listOfhoursToBeReviewed/index.vue

@@ -416,6 +416,7 @@ export default {
               goodsName: v.goodsName,
               orderGoodsId: v.orderGoodsId,
               keyId: `${v.userId}-${v.goodsId}-${v.gradeId}-${v.orderGoodsId}`,
+              showRedBackg:sessionStorage.TenantId == 779352047136603?true:false,//是否显示异常背景标红
             };
             this.checkSession(data)
               .then(() => {