Joe 3 年 前
コミット
1dad06c521

+ 74 - 0
src/api/order.js

@@ -0,0 +1,74 @@
+import request from '@/utils/request'
+
+// 查询优惠劵发放方式列表
+
+
+// 单条 查询优惠劵发放方式详细
+export function startRefund(id) {
+  return request({
+    url: '/coupon/issue/' + id,
+    method: 'get'
+  })
+}
+
+// 申请退款信息
+export function applyExaminRefund(data) {
+  return request({
+    url: '/station/order/applyExaminRefund',
+    method: 'post',
+    data: data
+  })
+}
+
+// 撤回申请的信息
+export function recallApplyRefund(data) {
+  return request({
+    url: '/station/order/recallApplyRefund',
+    method: 'post',
+    data: data
+  })
+}
+
+// 审核通过
+export function examinRefundSuccess(data) {
+  return request({
+    url: '/station/order/examinRefundSuccess',
+    method: 'post',
+    data: data
+  })
+}
+
+// 审核驳回
+export function examinRefundBack(data) {
+  return request({
+    url: '/station/order/examinRefundBack',
+    method: 'post',
+    data: data
+  })
+}
+
+// // 修改优惠劵发放方式
+// export function updateIssue(data) {
+//   return request({
+//     url: '/coupon/issue',
+//     method: 'put',
+//     data: data
+//   })
+// }
+
+// // 删除优惠劵发放方式
+// // export function delIssue(id) {
+// //   return request({
+// //     url: '/coupon/issue/' + id,
+// //     method: 'delete'
+// //   })
+// // }
+
+// // 导出优惠劵发放方式
+// export function exportIssue(query) {
+//   return request({
+//     url: '/coupon/issue/export',
+//     method: 'get',
+//     params: query
+//   })
+// }

+ 18 - 1
src/utils/pageStatus.js

@@ -5,7 +5,7 @@ import store from '@/store'
  * 油品,根据油品名查类型
  */
 export async function queryPageStatus(allowJiBieArr = [], type) { 
-  // type 1 积分 2 电子卡 3 优惠券 4 标签
+  // type 1 积分 2 电子卡 3 优惠券 4 标签 5 退款
   
 
   //返回值  0 页面初始状态 1 此页面不对此用户不开放 2 权限不在此页面 3 发生错误 4 页面在此页面,但未开启功能 5 正常显示 
@@ -34,11 +34,14 @@ export async function queryPageStatus(allowJiBieArr = [], type) {
   let couponFlag = 0
   let couponEnabledFlag = 0
   let labelFlag = 0
+  let refundExaminStatus = 0
 
+console.log('confData',confData);
 
   integralRuleFlag = confData.data.groupDept.integralRuleFlag; // 0 不共享 1 共享
   cardRuleFlag = confData.data.groupDept.cardRuleFlag; // 0 不共享 1 共享
   couponFlag = confData.data.groupDept.couponFlag; // 0 不共享 1 共享
+  refundExaminStatus =  confData.data.groupDept.refundExaminStatus; // 0站点 1集团
 
   if(integralRuleFlag == 1){
     integralFlag = confData.data.groupDept.integralFlag; // 开启 不开启
@@ -103,6 +106,13 @@ export async function queryPageStatus(allowJiBieArr = [], type) {
       }
     } else if (type == 4) {
       return 2
+    } else if (type == 5) {
+      if(refundExaminStatus == '1'){
+        return 5
+      }else if(refundExaminStatus == '0'){
+        return 4
+      }
+      return 3 
     }
   } else if (currentJiBie == 2) { // 站点
     if (type == 1) {
@@ -139,6 +149,13 @@ export async function queryPageStatus(allowJiBieArr = [], type) {
       } else {
         return 5
       }
+    } else if (type == 5) {
+      if(refundExaminStatus == '0'){
+        return 5
+      }else if(refundExaminStatus == '1'){
+        return 4
+      }
+      return 3 
     }
   }
 }

+ 3 - 3
src/views/label/Label_Batch.vue

@@ -87,7 +87,7 @@
               </div>
               <div class="input-group-prepend">
                 <span class="input-group-text" id="addon-wrapping">
-                  &lt;= 加油次数 &lt;
+                  &lt; 加油次数 &lt;
                 </span>
               </div>
               <input
@@ -134,7 +134,7 @@
               </div>
               <div class="input-group-prepend">
                 <span class="input-group-text" id="addon-wrapping">
-                  &lt;= 加油金额 &lt;
+                  &lt; 加油金额 &lt;
                 </span>
               </div>
               <input
@@ -180,7 +180,7 @@
               </div>
               <div class="input-group-prepend">
                 <span class="input-group-text" id="addon-wrapping">
-                  &lt;= 加油升数 &lt;
+                  &lt; 加油升数 &lt;
                 </span>
               </div>
               <input

+ 377 - 0
src/views/order/Order_Approval.vue

@@ -0,0 +1,377 @@
+<template>
+  <PermissionContainer
+    :jiBieArr="[1, 2]"
+    :type="4"
+    :tipArr="[
+      ,
+      '退款的审核只对集团和站点级别开放',
+      '因为集团上关于退款审核的权限配置,此级没有审核权限',
+      ,
+      '您暂未启动退款功能',
+    ]"
+  >
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      :inline="true"
+      label-width="68px"
+    >
+      <el-form-item label="订单号" prop="orderNo">
+        <el-input
+          v-model="queryParams.orderNo"
+          placeholder="请输入订单号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="客户姓名" prop="likeConsumer">
+        <el-input
+          v-model="queryParams.likeConsumer"
+          placeholder="请输入客户姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="油品名称" prop="oilName">
+        <el-select
+          v-model="queryParams.oilName"
+          placeholder="油品名称"
+          clearable
+          size="small"
+        >
+          <el-option
+            v-for="dict in oilNameOptions"
+            :key="dict.dictLabel"
+            :label="dict.dictLabel"
+            :value="dict.dictLabel"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="加油员" prop="oilPersonnel">
+        <el-input
+          v-model="queryParams.oilPersonnel"
+          placeholder="请输入加油员"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="油枪" prop="oilGun">
+        <el-input
+          v-model="queryParams.oilGun"
+          placeholder="请输入油枪"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="创建时间" prop="createdDate">
+        <el-date-picker
+          style="width: 350px"
+          v-model="dateRangeCreatedDate"
+          size="mini"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="cyan"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button
+          type="info"
+          icon="el-icon-refresh"
+          size="mini"
+          @click="resetQuery"
+          >重置</el-button
+        >
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          >导出</el-button
+        >
+      </el-form-item>
+    </el-form>
+    <el-table :data="orderList">
+      <af-table-column
+        label="油站名"
+        align="center"
+        prop="stationName"
+        v-if="jiBie == 0 || jiBie == 1"
+      />
+      <af-table-column
+        v-if="false"
+        label="订单id"
+        align="center"
+        prop="orderId"
+      />
+      <af-table-column label="订单号" align="center" prop="orderNo" />
+      <af-table-column label="油品名称" align="center" prop="oilName" />
+      <af-table-column label="油品价格" align="center" prop="oilPirce" />
+      <af-table-column label="加油升数" align="center" prop="orderLiters" />
+      <af-table-column label="应付金额" align="center" prop="receivableAmt" />
+      <af-table-column label="实付金额" align="center" prop="amt" />
+      <af-table-column label="优惠金额" align="center" prop="discountAmt" />
+      <af-table-column label="客户姓名" align="center" prop="consumer" />
+      <af-table-column label="加油员" align="center" prop="oilPersonnel" />
+      <af-table-column label="加油枪号" align="center" prop="oilGun" />
+      <af-table-column
+        label="支付类型"
+        align="center"
+        prop="payType"
+        width="150px"
+        :formatter="payTypeFotmat"
+      />
+      <af-table-column
+        label="油站名称"
+        align="center"
+        v-if="false"
+        prop="stationName"
+      />
+      <af-table-column
+        v-if="false"
+        label="用户id(消费者)"
+        align="center"
+        prop="consumerId"
+      />
+      <af-table-column
+        v-if="false"
+        label="油站id"
+        align="center"
+        prop="stationId"
+      />
+      <af-table-column
+        label="状态"
+        width="130px"
+        align="center"
+        prop="status"
+        :formatter="statusFotmat"
+      />
+      <af-table-column label="支付时间" align="center" prop="payDate">
+        <template slot-scope="scope">
+          <span>{{
+            parseTime(scope.row.payDate, "{y}-{m}-{d} {h}:{i}:{s}")
+          }}</span>
+        </template>
+      </af-table-column>
+      <af-table-column label="创建时间" align="center" prop="createdDate">
+        <template slot-scope="scope">
+          <span>{{
+            parseTime(scope.row.createdDate, "{y}-{m}-{d} {h}:{i}:{s}")
+          }}</span>
+        </template>
+      </af-table-column>
+      <af-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+        width="240px"
+        v-if="reprint"
+      >
+        <template slot-scope="scope">
+          <el-popconfirm
+            title="审核通过后立刻走退款流程,且不可撤销,是否继续"
+            confirm-button-text="审核通过"
+            @onConfirm="examinRefundSuccess(scope.row)"
+          >
+            <el-button
+              slot="reference"
+              size="mini"
+              type="text"
+              icon="el-icon-plus"
+              >审核通过</el-button
+            >
+          </el-popconfirm>
+          <el-popconfirm
+            title="确认驳回此退款申请,是否继续"
+            confirm-button-text="确定"
+            @onConfirm="examinRefundBack(scope.row)"
+          >
+            <el-button
+              slot="reference"
+              size="mini"
+              type="text"
+              icon="el-icon-plus"
+              >驳回申请</el-button
+            >
+          </el-popconfirm>
+        </template>
+      </af-table-column>
+    </el-table>
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+  </PermissionContainer>
+</template>
+<script>
+import { listOrder, exportOrder, printOrderInfo } from "@/api/station/order";
+import { stationinfo } from "@/api/station/gun";
+import { listPrice, getPrice } from "@/api/station/price";
+import { listManage } from "@/api/station/manage";
+import { examinRefundSuccess, examinRefundBack } from "@/api/order";
+
+export default {
+  name: "Order_Oil",
+  data() {
+    return {
+      //创建订单时间间隔
+      dateRangeCreatedDate: [],
+      // 总条数
+      total: 0,
+      // 订单支付表格数据
+      orderList: [],
+      oilNameOptions: [],
+      // 字典
+      payTypeOptions: [],
+      // 下拉油站
+      stationOptions: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        levelId: this.levelId,
+        pageNum: 1,
+        pageSize: 10,
+        oilGun: null,
+        oilName: null,
+        stationId: null,
+        orderType: 1,
+        oilPersonnel: null,
+        createdDate: null,
+        likeConsumer: null,
+        orderNo: null,
+        examinStatus: "1", // -1 查询下面的列表: 1申请  2成功 3驳回 4 失败 
+      },
+      // 表单校验
+      rules: {},
+      reprint: false,
+    };
+  },
+  created() {
+    this.getList();
+    listManage({
+      pageNum: 1,
+      pageSize: 1,
+    }).then((response) => {
+      const equipmentList = response.rows;
+      if (!!equipmentList) {
+        if ((equipmentList[0] || {}).deviceType == "1") {
+          this.reprint = true;
+        }
+      }
+    });
+    //字典
+    this.getDicts("pay_type").then((response) => {
+      this.payTypeOptions = response.data;
+    });
+    stationinfo().then((response) => {
+      this.stationOptions = response.rows;
+    });
+    this.getDicts("oil_name").then((response) => {
+      this.oilNameOptions = response.data;
+    });
+  },
+  methods: {
+    // 审批通过
+    examinRefundSuccess(row){
+      examinRefundSuccess(row).then((res) => {
+        console.log(row);
+      })
+    },
+    // 驳回申请
+    examinRefundBack(row){
+      examinRefundBack(row).then((res) => {
+        this.msgSuccess('已经驳回该退款申请')
+        this.getList();
+      })
+    },
+    payTypeFotmat(row, column) {
+      if (row.payType === "wx") {
+        return "微信支付";
+      } else if (row.payType === "zfb") {
+        return "支付宝支付";
+      } else if (row.payType === "xj") {
+        return "现金支付";
+      } else if (row.payType === "dzk") {
+        return "电子卡支付";
+      } else if (row.payType === "POS") {
+        return "POS机支付";
+      } else if (row.payType === "yzf") {
+        return "预支付";
+      } else if (row.payType === "kbzf") {
+        return "卡包支付";
+      }
+    },
+    statusFotmat(row, column) {
+      if (row.status === "0") {
+        return "未支付";
+      } else if (row.status === "1") {
+        return "已支付";
+      }
+    },
+    /** 查询订单支付列表 */
+    getList() {
+      this.queryParams.levelId = this.levelId;
+      listOrder(
+        this.addDateRange(this.queryParams, this.dateRangeCreatedDate)
+      ).then((response) => {
+        this.orderList = response.rows;
+        this.total = response.total;
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRangeCreatedDate = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    //打印订单小票
+    printOrderInfo(row) {
+      printOrderInfo({ orderId: row.orderId }).then((response) => {
+        this.msgSuccess("小票打印成功");
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm("是否确认导出所有订单支付数据项?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return exportOrder(queryParams);
+        })
+        .then((response) => {
+          this.download(response.msg);
+        });
+    },
+  },
+};
+</script>

+ 396 - 0
src/views/order/Order_Refund.vue

@@ -0,0 +1,396 @@
+<template>
+  <PermissionContainer
+    :jiBieArr="[2]"
+    :tipArr="[
+      ,
+      '申请退款只对站点级别开放',
+      '因为集团上关于申请退款的权限配置,此级没有申请退款权限',
+      ,
+      '您暂未启动退款功能',
+    ]"
+  >
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      :inline="true"
+      label-width="68px"
+    >
+      <el-form-item label="订单号" prop="orderNo">
+        <el-input
+          v-model="queryParams.orderNo"
+          placeholder="请输入订单号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="客户姓名" prop="likeConsumer">
+        <el-input
+          v-model="queryParams.likeConsumer"
+          placeholder="请输入客户姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="油品名称" prop="oilName">
+        <el-select
+          v-model="queryParams.oilName"
+          placeholder="油品名称"
+          clearable
+          size="small"
+        >
+          <el-option
+            v-for="dict in oilNameOptions"
+            :key="dict.dictLabel"
+            :label="dict.dictLabel"
+            :value="dict.dictLabel"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="加油员" prop="oilPersonnel">
+        <el-input
+          v-model="queryParams.oilPersonnel"
+          placeholder="请输入加油员"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="油枪" prop="oilGun">
+        <el-input
+          v-model="queryParams.oilGun"
+          placeholder="请输入油枪"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="创建时间" prop="createdDate">
+        <el-date-picker
+          style="width: 350px"
+          v-model="dateRangeCreatedDate"
+          size="mini"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="cyan"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button
+          type="info"
+          icon="el-icon-refresh"
+          size="mini"
+          @click="resetQuery"
+          >重置</el-button
+        >
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          >导出</el-button
+        >
+      </el-form-item>
+    </el-form>
+    <el-table :data="orderList">
+      <af-table-column label="油站名" align="center" prop="stationName" v-if="jiBie==0||jiBie==1"/>
+      <af-table-column
+        v-if="false"
+        label="订单id"
+        align="center"
+        prop="orderId"
+      />
+      <af-table-column label="订单号" align="center" prop="orderNo" />
+      <af-table-column label="油品名称" align="center" prop="oilName" />
+      <af-table-column label="油品价格" align="center" prop="oilPirce" />
+      <af-table-column label="加油升数" align="center" prop="orderLiters" />
+      <af-table-column label="应付金额" align="center" prop="receivableAmt" />
+      <af-table-column label="实付金额" align="center" prop="amt" />
+      <af-table-column label="优惠金额" align="center" prop="discountAmt" />
+      <af-table-column label="客户姓名" align="center" prop="consumer" />
+      <af-table-column label="加油员" align="center" prop="oilPersonnel" />
+      <af-table-column label="加油枪号" align="center" prop="oilGun" />
+      <af-table-column
+        label="支付类型"
+        align="center"
+        prop="payType"
+        width="150px"
+        :formatter="payTypeFotmat"
+      />
+      <af-table-column
+        label="油站名称"
+        align="center"
+        v-if="false"
+        prop="stationName"
+      />
+      <af-table-column
+        v-if="false"
+        label="用户id(消费者)"
+        align="center"
+        prop="consumerId"
+      />
+      <af-table-column
+        v-if="false"
+        label="油站id"
+        align="center"
+        prop="stationId"
+      />
+      <af-table-column
+        label="状态"
+        width="130px"
+        align="center"
+        prop="status"
+        :formatter="statusFotmat"
+      />
+      <af-table-column label="支付时间" align="center" prop="payDate">
+        <template slot-scope="scope">
+          <span>{{
+            parseTime(scope.row.payDate, "{y}-{m}-{d} {h}:{i}:{s}")
+          }}</span>
+        </template>
+      </af-table-column>
+      <af-table-column label="创建时间" align="center" prop="createdDate">
+        <template slot-scope="scope">
+          <span>{{
+            parseTime(scope.row.createdDate, "{y}-{m}-{d} {h}:{i}:{s}")
+          }}</span>
+        </template>
+      </af-table-column>
+      <af-table-column
+        label="状态"
+        align="center"
+        class-name="small-padding fixed-width"
+        width="120px"
+        v-if="reprint"
+      >
+        <template slot-scope="scope">
+          {{ parseExaminStatus(scope.row.examinStatus)}}
+        </template>
+      </af-table-column>
+      
+       <af-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+        width="120px"
+        v-if="reprint"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-plus"
+            :disable="scope.row.examinStatus=='2'"
+            @click="startRefund(scope.row)"
+            >{{
+              scope.row.examinStatus == null ? '申请退款' : '' + 
+              scope.row.examinStatus == '0' ? '申请退款' : '' + 
+              scope.row.examinStatus == '1' ? '撤销退款申请' : '' +
+              scope.row.examinStatus == '3' ? '再次发起申请' : '' +
+              scope.row.examinStatus == '2' ? '已经退款' : '' + 
+              scope.row.examinStatus == '4' ? '再次发起申请' : '' 
+            }}</el-button>
+        </template>
+      </af-table-column>
+    </el-table>
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+  </PermissionContainer>
+</template>
+<script>
+import { listOrder, exportOrder,printOrderInfo } from "@/api/station/order";
+import { stationinfo } from "@/api/station/gun";
+import { listPrice, getPrice } from "@/api/station/price";
+import {
+  listManage
+} from "@/api/station/manage";
+import { applyExaminRefund, recallApplyRefund} from "@/api/order"
+
+export default {
+  name: "Order_Oil",
+  data() {
+    return {
+      //创建订单时间间隔
+      dateRangeCreatedDate: [],
+      // 总条数
+      total: 0,
+      // 订单支付表格数据
+      orderList: [],
+      oilNameOptions: [],
+      // 字典
+      payTypeOptions: [],
+      // 下拉油站
+      stationOptions: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        levelId:this.levelId,
+        pageNum: 1,
+        pageSize: 10,
+        oilGun: null,
+        oilName: null,
+        stationId: null,
+        orderType: 1,
+        oilPersonnel: null,
+        createdDate: null,
+        likeConsumer: null,
+        orderNo:null
+      },
+      // 表单校验
+      rules: {},
+      reprint:false,
+    };
+  },
+  created() {
+    this.getList();
+    listManage({
+      pageNum: 1,
+      pageSize: 1,
+    }).then((response) => {
+      const equipmentList = response.rows;
+      if(!!equipmentList){
+        if((equipmentList[0]||{}).deviceType=='1'){
+          this.reprint = true;
+        }
+      }
+    });
+    //字典
+    this.getDicts("pay_type").then((response) => {
+      this.payTypeOptions = response.data;
+    });
+    stationinfo().then((response) => {
+      this.stationOptions = response.rows;
+    });
+    this.getDicts("oil_name").then((response) => {
+      this.oilNameOptions = response.data;
+    });
+  },
+  methods: {
+    parseExaminStatus(status){
+      if(status  == null || status == '0'){
+        return "未申请"
+      }else if(status == "1"){
+        return "已申请退款,等待机构审核"
+      }else if(status == "2"){
+        return "退款成功"
+      }else if (status == "3"){
+        return "机构已驳回退款,失败原因联系审核机构"
+      }else if (status == "4"){
+        return "退款失败,失败原因联系审核机构"
+      }
+    },
+    startRefund(row){
+      if(row.examinStatus=='1' ){
+        recallApplyRefund(row).then(res=>{
+          this.msgSuccess("撤回退款成功")
+        }).then(res=>{
+          this.getList()
+        })
+      }else if(row.examinStatus == null || row.examinStatus == '0'){
+        applyExaminRefund(row).then(res=>{
+          this.msgSuccess('已申请退款')
+        }).then(res=>{
+          this.getList()
+        })
+      }else if(row.examinStatus == '2'){
+        console.log('已经退款成功');
+      }else if (row.examinStatus == '3'){
+         applyExaminRefund(row).then(res=>{
+          this.msgSuccess('已申请退款')
+        }).then(res=>{
+          this.getList()
+        })
+      }
+      
+    },
+    payTypeFotmat(row, column) {
+      if (row.payType === "wx") {
+        return "微信支付";
+      } else if (row.payType === "zfb") {
+        return "支付宝支付";
+      } else if (row.payType === "xj") {
+        return "现金支付";
+      } else if (row.payType === "dzk") {
+        return "电子卡支付";
+      } else if (row.payType === "POS") {
+        return "POS机支付";
+      } else if (row.payType === "yzf") {
+        return "预支付";
+      } else if (row.payType === "kbzf") {
+        return "卡包支付";
+      }
+    },
+    statusFotmat(row, column) {
+      if (row.status === "0") {
+        return "未支付";
+      } else if (row.status === "1") {
+        return "已支付";
+      }
+    },
+    /** 查询订单支付列表 */
+    getList() {
+      this.queryParams.levelId = this.levelId
+      listOrder(
+        this.addDateRange(this.queryParams, this.dateRangeCreatedDate)
+      ).then((response) => {
+        this.orderList = response.rows;
+        this.total = response.total;
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRangeCreatedDate = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    //打印订单小票
+    printOrderInfo(row){
+      printOrderInfo({orderId:row.orderId}).then((response) => {
+         this.msgSuccess("小票打印成功");
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm("是否确认导出所有订单支付数据项?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return exportOrder(queryParams);
+        })
+        .then((response) => {
+          this.download(response.msg);
+        });
+    },
+  },
+};
+</script>

+ 329 - 0
src/views/order/Order_Refunded.vue

@@ -0,0 +1,329 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      :inline="true"
+      label-width="68px"
+    >
+      <el-form-item label="订单号" prop="orderNo">
+        <el-input
+          v-model="queryParams.orderNo"
+          placeholder="请输入订单号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="客户姓名" prop="likeConsumer">
+        <el-input
+          v-model="queryParams.likeConsumer"
+          placeholder="请输入客户姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="油品名称" prop="oilName">
+        <el-select
+          v-model="queryParams.oilName"
+          placeholder="油品名称"
+          clearable
+          size="small"
+        >
+          <el-option
+            v-for="dict in oilNameOptions"
+            :key="dict.dictLabel"
+            :label="dict.dictLabel"
+            :value="dict.dictLabel"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="加油员" prop="oilPersonnel">
+        <el-input
+          v-model="queryParams.oilPersonnel"
+          placeholder="请输入加油员"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="油枪" prop="oilGun">
+        <el-input
+          v-model="queryParams.oilGun"
+          placeholder="请输入油枪"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="创建时间" prop="createdDate">
+        <el-date-picker
+          style="width: 350px"
+          v-model="dateRangeCreatedDate"
+          size="mini"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="cyan"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button
+          type="info"
+          icon="el-icon-refresh"
+          size="mini"
+          @click="resetQuery"
+          >重置</el-button
+        >
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          >导出</el-button
+        >
+      </el-form-item>
+    </el-form>
+    <el-table :data="orderList">
+      <af-table-column label="油站名" align="center" prop="stationName" v-if="jiBie==0||jiBie==1"/>
+      <af-table-column
+        v-if="false"
+        label="订单id"
+        align="center"
+        prop="orderId"
+      />
+      <af-table-column label="订单号" align="center" prop="orderNo" />
+      <af-table-column label="油品名称" align="center" prop="oilName" />
+      <af-table-column label="油品价格" align="center" prop="oilPirce" />
+      <af-table-column label="加油升数" align="center" prop="orderLiters" />
+      <af-table-column label="应付金额" align="center" prop="receivableAmt" />
+      <af-table-column label="实付金额" align="center" prop="amt" />
+      <af-table-column label="优惠金额" align="center" prop="discountAmt" />
+      <af-table-column label="客户姓名" align="center" prop="consumer" />
+      <af-table-column label="加油员" align="center" prop="oilPersonnel" />
+      <af-table-column label="加油枪号" align="center" prop="oilGun" />
+      <af-table-column
+        label="支付类型"
+        align="center"
+        prop="payType"
+        width="150px"
+        :formatter="payTypeFotmat"
+      />
+      <af-table-column
+        label="油站名称"
+        align="center"
+        v-if="false"
+        prop="stationName"
+      />
+      <af-table-column
+        v-if="false"
+        label="用户id(消费者)"
+        align="center"
+        prop="consumerId"
+      />
+      <af-table-column
+        v-if="false"
+        label="油站id"
+        align="center"
+        prop="stationId"
+      />
+      <af-table-column
+        label="状态"
+        width="130px"
+        align="center"
+        prop="status"
+        :formatter="statusFotmat"
+      />
+      <af-table-column label="支付时间" align="center" prop="payDate">
+        <template slot-scope="scope">
+          <span>{{
+            parseTime(scope.row.payDate, "{y}-{m}-{d} {h}:{i}:{s}")
+          }}</span>
+        </template>
+      </af-table-column>
+      <af-table-column label="创建时间" align="center" prop="createdDate">
+        <template slot-scope="scope">
+          <span>{{
+            parseTime(scope.row.createdDate, "{y}-{m}-{d} {h}:{i}:{s}")
+          }}</span>
+        </template>
+      </af-table-column>
+       <af-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+        width="120px"
+        v-if="reprint"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-plus"
+            @click="printOrderInfo(scope.row)"
+            >补打小票</el-button>
+        </template>
+      </af-table-column>
+    </el-table>
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+<script>
+import { listOrder, exportOrder,printOrderInfo } from "@/api/station/order";
+import { stationinfo } from "@/api/station/gun";
+import { listPrice, getPrice } from "@/api/station/price";
+
+import {
+  listManage
+} from "@/api/station/manage";
+
+
+export default {
+  name: "Order_Oil",
+  data() {
+    return {
+      //创建订单时间间隔
+      dateRangeCreatedDate: [],
+      // 总条数
+      total: 0,
+      // 订单支付表格数据
+      orderList: [],
+      oilNameOptions: [],
+      // 字典
+      payTypeOptions: [],
+      // 下拉油站
+      stationOptions: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        levelId:this.levelId,
+        pageNum: 1,
+        pageSize: 10,
+        oilGun: null,
+        oilName: null,
+        stationId: null,
+        orderType: 1,
+        oilPersonnel: null,
+        createdDate: null,
+        likeConsumer: null,
+        orderNo:null
+      },
+      // 表单校验
+      rules: {},
+      reprint:false,
+    };
+  },
+  created() {
+    this.getList();
+    listManage({
+      pageNum: 1,
+      pageSize: 1,
+    }).then((response) => {
+      const equipmentList = response.rows;
+      if(!!equipmentList){
+        if((equipmentList[0]||{}).deviceType=='1'){
+          this.reprint = true;
+        }
+      }
+    });
+    //字典
+    this.getDicts("pay_type").then((response) => {
+      this.payTypeOptions = response.data;
+    });
+    stationinfo().then((response) => {
+      this.stationOptions = response.rows;
+    });
+    this.getDicts("oil_name").then((response) => {
+      this.oilNameOptions = response.data;
+    });
+  },
+  methods: {
+    payTypeFotmat(row, column) {
+      if (row.payType === "wx") {
+        return "微信支付";
+      } else if (row.payType === "zfb") {
+        return "支付宝支付";
+      } else if (row.payType === "xj") {
+        return "现金支付";
+      } else if (row.payType === "dzk") {
+        return "电子卡支付";
+      } else if (row.payType === "POS") {
+        return "POS机支付";
+      } else if (row.payType === "yzf") {
+        return "预支付";
+      } else if (row.payType === "kbzf") {
+        return "卡包支付";
+      }
+    },
+    statusFotmat(row, column) {
+      if (row.status === "0") {
+        return "未支付";
+      } else if (row.status === "1") {
+        return "已支付";
+      }
+    },
+    /** 查询订单支付列表 */
+    getList() {
+      this.queryParams.levelId = this.levelId
+      listOrder(
+        this.addDateRange(this.queryParams, this.dateRangeCreatedDate)
+      ).then((response) => {
+        this.orderList = response.rows;
+        this.total = response.total;
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRangeCreatedDate = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    //打印订单小票
+    printOrderInfo(row){
+      printOrderInfo({orderId:row.orderId}).then((response) => {
+         this.msgSuccess("小票打印成功");
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm("是否确认导出所有订单支付数据项?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return exportOrder(queryParams);
+        })
+        .then((response) => {
+          this.download(response.msg);
+        });
+    },
+  },
+};
+</script>

+ 16 - 1
src/views/station/Station_Group.vue

@@ -42,6 +42,18 @@
           共享:集团站点统一设置优惠卷规则,每个集团下的站点优惠卷通用
         </div>
       </el-form-item>
+      <el-form-item label="退款审核权限归属" prop="refundExaminStatus">
+        <el-radio-group v-model="form.refundExaminStatus" :disabled="disabled">
+          <el-radio label="0">站点</el-radio>
+          <el-radio label="1">集团</el-radio>
+        </el-radio-group>
+        <div style="color: red; font-size: 12px">
+          站点:站点发起退款后,审核的权限放在站点
+        </div>
+        <div style="color: red; font-size: 12px">
+          集团:站点发起退款后,审核的权限放在集团
+        </div>
+      </el-form-item>
     </el-form>
     <div slot="footer" class="dialog-footer">
       <el-row>
@@ -88,8 +100,11 @@ export default {
           { required: true, message: "请选择是否开启积分", trigger: "change" },
         ],
         couponFlag: [
-          { required: true, message: "请选择是否开启积分", trigger: "change" },
+          { required: true, message: "请选择是否开启优惠券", trigger: "change" },
         ],
+        refundExaminStatus: [
+          { required: true, message: "请选择是否退款的权限", trigger: "change" },
+        ]
       },
       pageStatus: 0
     };