Ver código fonte

优惠券代码精简

Joe 3 anos atrás
pai
commit
e1894ecda8

+ 10 - 2
src/api/coupon.js

@@ -63,8 +63,16 @@ export function verificationList(query) {
   })
 }
 
+//查询优惠劵状态
 
-// 导出优惠劵
+export function selectCouponEnableFalge(data) {
+  return request({
+    url: '/coupon/info/selectCouponEnableFalge',
+    method: 'get',
+    data: data
+  })
+}
+// 开启关闭优惠劵
 export function changeCouponStatus(data) {
   return request({
     url: '/system/dept/updateDeptInfo',
@@ -115,4 +123,4 @@ export function queryCouponUserList(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 14 - 14
src/views/coupon/Coupon_CreateCoupon.vue

@@ -675,8 +675,8 @@ import {
   listInfo,
   updateInfo,
   changeCouponStatus,
+  selectCouponEnableFalge
 } from "@/api/coupon";
-import { updateDept } from "@/api/system/dept";
 
 export default {
   name: "Coupon_CreateCoupon",
@@ -726,15 +726,6 @@ export default {
       }
       callback();
     };
-    // let validateVerificationList = (rule, value, callback)=>{
-    //   if(this.createForm.couponType == 3){
-    //     if(this.createForm.validateVerificationList.length == 0){
-    //       callback(new Error("请选择核销机构"));
-    //       return;
-    //     }
-    //   }
-    //   callback()
-    // };
     return {
        //创建优惠券的时间
       dateRangeCreatedDate: [],
@@ -859,7 +850,6 @@ export default {
   },
   created() {
     this.init();
-    this.getCoupon();
   },
   computed: {
     toggleable() {
@@ -1110,9 +1100,19 @@ export default {
       this.$refs.leftTable.clearSelection();
     },
     init() {
-      this.getOilList();
-      this.getCoupon();
-      this.getVerificationList();
+      selectCouponEnableFalge().then((res)=>{
+      if(res.code == 200){
+        this.couponEnabledFlag =  res.data.toString();
+        this.getOilList();
+        this.getCoupon();
+        this.getVerificationList();
+      }else{
+        throw new Error("");
+      }
+    }).catch((err)=>{
+      this.msgError('拉取优惠券配置失败')
+    })
+      
     },
     // 取消按钮
     cancel() {

+ 4 - 542
src/views/coupon/Coupon_Statistics/index.vue

@@ -10,15 +10,15 @@
       '您暂未启动优惠券功能',
     ]"
   >
-    <div>
+    <div style="margin-left:10px;">
       <el-tabs v-model="activeName">
-        <el-tab-pane label="实时发放" name="realTime" :key="'info'">
+        <el-tab-pane label="实时发放" name="realTime" :key="'realTime'">
           <child1></child1>
         </el-tab-pane>
         <el-tab-pane label="按发放方式" name="issue" :key="'issue'">
           <child2></child2>
         </el-tab-pane>
-        <el-tab-pane label="按优惠券类" name="model" :key="'pay'">
+        <el-tab-pane label="按优惠券类" name="model" :key="'model'">
           <child3></child3>
         </el-tab-pane>
       </el-tabs>
@@ -27,569 +27,31 @@
 </template>
 
 <script>
-import {
-  listManage,
-  getManage,
-  delManage,
-  addManage,
-  updateManage,
-  exportManage,
-  changeManageStatus,
-} from "@/api/station/manage";
-import { listPrice } from "@/api/station/price";
 
 import tabZujianChild1 from "./realTime.vue";
 import tabZujianChild2 from "./issue.vue";
 import tabZujianChild3 from "./model.vue";
 
-import Vue from "vue";
-import VueClipboard from "vue-clipboard2";
-
-import Qr from "@/components/QrCode";
-import Base64 from "@/utils/base64";
-
-Vue.use(VueClipboard);
-
-import {
-  addInfo,
-  listInfo,
-  updateInfo,
-  changeCouponStatus,
-  addIssue,
-  listIssue,
-  upIssueStatus,
-} from "@/api/coupon";
-import SelectDay from "@/components/SelectDay";
-import settings from "@/settings";
 
 export default {
   name: "Coupon_CreateIssue",
   data() {
-    let validateGunNo = (rule, value, callback) => {
-      callback();
-    };
-    let validateAvailableControl = (rule, value, callback) => {
-      if (
-        this.createForm.availableControl == 1 ||
-        this.createForm.availableControl == 2
-      ) {
-        if (this.createForm.cycleDaysList.length == 0) {
-          callback(new Error("请选择时间"));
-          return;
-        }
-      }
-      if (this.createForm.availableControl == 3) {
-        if (this.createForm.appointedDaysList.length == 0) {
-          callback(new Error("请选择日期"));
-          return;
-        }
-      }
-      callback();
-    };
-    let validateCouponIssueRelationList = (rule, value, callback) => {
-      if (this.createForm.couponIssueRelationList.length == 0) {
-        callback(new Error("请选择优惠券"));
-      }
-      callback();
-    };
     return {
       activeName: "realTime",
-      couponEnabledFlag: "1",
-      exportQrDialog: false,
-      pageStatus: 4,
-      createForm: {
-        issueRemark: "",
-        issueName: "",
-        showIdList: [],
-        availableControl: "0",
-        appointedDaysList: [],
-        cycleDaysList: [],
-        issueType: "",
-        discountThresholdAmt: "0",
-        couponIssueRelationList: [],
-        giveLimit: 9,
-        giveCount: 999999,
-      },
-      currentExport: {
-        text: "error",
-        type: "你好",
-        name: "二维码",
-      },
-      couponList: [],
-      oilNameList: [],
-      allVerificationList: [],
-      equipmentList: [],
-      // 油枪复选
-      allGunList: [],
-      // 已选的油枪
-      checkedGunList: [],
-      //设备状态
-      deviceStatusOptions: [],
-      //设备类型
-      deviceTypeOptions: [],
-      stationOptions: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 总条数
-      total: 100,
-      leftQuery: {},
-      rightQuery: {},
-      leftData: [],
-      rightData: [],
-      moveRightData: [],
-      moveLeftData: [],
-      // 查询参数
-      queryForm: {
-        pageNum: 1,
-        pageSize: 10, // 初始值只能比10大
-      },
-      // 表单校验
-      rules: {
-        availableControl: [
-          {
-            required: true,
-            message: "请选择有效期内时间控制",
-            trigger: "change",
-          },
-          { validator: validateAvailableControl, trigger: "change" },
-        ],
-        couponIssueRelationList: [
-          {
-            required: true,
-            message: "请选择优惠券",
-            trigger: "change",
-          },
-          { validator: validateCouponIssueRelationList, trigger: "change" },
-        ],
-      },
-      day: [],
-      cycle: [],
-      issueList: [],
-      timeSelect: [
-        ,
-        ["周天", "周一", "周二", "周三", "周四", "周五", "周六"],
-        [
-          "1号",
-          "2号",
-          "3号",
-          "4号",
-          "5号",
-          "6号",
-          "7号",
-          "8号",
-          "9号",
-          "10号",
-          "11号",
-          "12号",
-          "13号",
-          "14号",
-          "15号",
-          "16号",
-          "17号",
-          "18号",
-          "19号",
-          "20号",
-          "21号",
-          "22号",
-          "23号",
-          "24号",
-          "25号",
-          "26号",
-          "27号",
-          "28号",
-          "29号",
-          "30号",
-          "31号",
-        ],
-      ],
     };
   },
   components: {
-    SelectDay: SelectDay,
-    Qr: Qr,
-    VueClipboard: VueClipboard,
     child1: tabZujianChild1,
     child2: tabZujianChild2,
     child3: tabZujianChild3,
   },
 
   created() {
-    console.log("哈哈");
-    console.log("settings", settings);
-    // this.init();
-    this.getCoupon();
-    // this.setPageStatus();
-    this.getIssueList();
   },
-  computed: {
-    toggleable() {
-      if (this.moveRightData.length === 0 && this.moveLeftData.length === 0) {
-        return true;
-      }
-      return false;
-    },
-    selectedCouponList() {
-      return this.couponList.filter((ele) => {
-        if (this.createForm.couponIssueRelationList == null) {
-          this.createForm.couponIssueRelationList = [];
-        }
-        return this.createForm.couponIssueRelationList.includes(ele.id);
-      });
-    },
-    unselectedCouponList() {
-      return this.couponList.filter((ele) => {
-        if (this.createForm.couponIssueRelationList == null) {
-          this.createForm.couponIssueRelationList = [];
-        }
-        return !!!this.createForm.couponIssueRelationList.includes(ele.id);
-      });
-    },
-    getTodayDateString() {
-      const date = new Date();
-      let y = date.getFullYear();
-      let m = date.getMonth().toString();
-      let s = date.getDate().toString();
-      m = "" + (m.length == 1 ? "0" : "") + m;
-      s = "" + (s.length == 1 ? "0" : "") + s;
-      console.log("" + h + ":" + m + ":" + s);
-      return "" + y + ":" + m + ":" + s;
-    },
-  },
-  methods: {
-    onCopySuccess() {
-      this.msgSuccess("网址已经拷贝到剪切板");
-    },
-    onCopyError() {
-      this.msgError("网址拷贝失败,请手动复制");
-    },
-    // exportUrl(url){
-    //   this.currentExport.name = emp.personnelName;
-    //   this.currentExport.type = 1;
-
-    //   const encodeStr = "e" + emp.personnelId + "/l" + this.currentExport.labelId + "/";
-    //   const encodedStr = this.base.encode(encodeStr);
-    //   const trimEqualStr = encodedStr.replace(/={1,}$/g, "");
-    //   this.currentExport.text = "https://goto.huijy.net/" + this.deptId + "/" + trimEqualStr;
-    //   this.exportQrDialog = true;
-    // },
-    handleExport(row) {
-      this.currentExport.name = row.issueName;
-      const base64 = Base64.getInstance();
-      const encodeStr = "i" + row.id;
-      const encodedStr = base64.encode(encodeStr);
-      const trimEqualStr = encodedStr.replace(/={1,}$/g, "");
-      this.exportQrDialog = true;
-      this.currentExport.text =
-        settings.baseURL + this.deptId + "/" + trimEqualStr;
-    },
-    downloadImg() {
-      console.log("");
-    },
-    translateTime(row) {
-      let timeString = "";
-      const availableControleType = row.availableControl;
-      if (availableControleType == 0) {
-        return "用户一直都可以领取";
-      }
-      timeString = "用户只能在";
-      if (availableControleType == 1) {
-        timeString += "每周的";
-      }
-      if (availableControleType == 2) {
-        timeString += "每月的";
-      }
-      if (availableControleType == 3) {
-        timeString += "指定的日期 ";
-      }
-      if (availableControleType == 1 || availableControleType == 2) {
-        row.cycleDaysList.forEach((ele) => {
-          timeString += this.timeSelect[availableControleType][ele] + "、";
-        });
-      } else if (availableControleType == 3) {
-        timeString += row.appointedDaysList.toString();
-      }
 
-      timeString = timeString.replace(/(、)$/g, "") + "可以领取劵";
-      return timeString;
-    },
-    getIssueList() {
-      listIssue(this.queryForm)
-        .then((res) => {
-          if (res.code == 200) {
-            if (res.rows == null) {
-              this.total = 0;
-              this.issueList = [];
-            } else {
-              this.total = res.total;
-              this.issueList = res.rows;
-            }
-          } else {
-            throw new Error("");
-          }
-        })
-        .catch((err) => {
-          this.msgError("亲,拉取领取方式列表失败~");
-        });
-    },
-    getCoupon() {
-      listInfo({
-        pageNum: 1,
-        pageSize: 1000,
-        status: 1,
-      })
-        .then((res) => {
-          if (res.code == 200) {
-            if (res.rows == null) {
-              this.couponList = [];
-            } else {
-              this.couponList = res.rows;
-            }
-          } else {
-            throw new Error("");
-          }
-        })
-        .catch((err) => {
-          this.msgError("亲,拉取优惠券列表失败~");
-        });
-    },
-    availableControlChange() {
-      this.createForm.appointedDaysList = [];
-      this.createForm.cycleDaysList = [];
-      this.createForm = { ...this.createForm };
-    },
-    handleMoveLabel(direction, row) {
-      console.log(row);
-      if (this.createForm.couponIssueRelationList == null) {
-        this.createForm.couponIssueRelationList = [];
-      }
-
-      if (direction == "right") {
-        this.createForm.couponIssueRelationList.push(row.id);
-      } else {
-        this.createForm.couponIssueRelationList =
-          this.createForm.couponIssueRelationList.filter((ele) => {
-            return ele != row.id;
-          });
-      }
-    },
-    handleFlagChange() {
-      const that = this;
-      let text = this.couponEnabledFlag === "1" ? "启用" : "停用";
-      this.$confirm('确认要"' + text + '"优惠券功能吗?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(function () {
-          return changeCouponStatus({
-            deptId: that.deptId,
-            couponEnabledFlag: that.couponEnabledFlag,
-          });
-        })
-        .then(() => {
-          that.msgSuccess(text + "成功");
-        })
-        .catch(function () {
-          that.couponEnabledFlag = that.couponEnabledFlag === "0" ? "1" : "0";
-        });
-    },
-    handleStatusChange(row) {
-      let text = row.status === "1" ? "启用" : "停用";
-      this.$confirm(
-        '确认要"' + text + '""' + row.issueName + '"发放方式吗?',
-        "警告",
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }
-      )
-        .then(function () {
-          return upIssueStatus({
-            id: row.id,
-            status: row.status,
-          });
-        })
-        .then(() => {
-          this.msgSuccess(text + "成功");
-        })
-        .catch(function () {
-          row.status = row.status === "0" ? "1" : "0";
-        });
-    },
-    toggleLabel() {
-      if (this.moveLeftData.length !== 0) {
-        this.createForm.couponIssueRelationList =
-          this.createForm.couponIssueRelationList.filter((ele) => {
-            return ele != this.moveLeftData;
-          });
-        this.createForm = { ...this.createForm };
-        return;
-      }
-      if (this.moveRightData.length !== 0) {
-        this.createForm.couponIssueRelationList = [
-          ...new Set(
-            this.createForm.couponIssueRelationList.concat(this.moveRightData)
-          ),
-        ].filter((ele) => {
-          return !!ele;
-        });
-        this.createForm = { ...this.createForm };
-        return;
-      }
-      return;
-    },
-    handleLeftChange(val) {
-      let changeArr = [];
-      val.map((ele) => {
-        changeArr.push(ele.id);
-      });
-      console.log(changeArr);
-      this.moveLeftData = [];
-      this.moveRightData = changeArr;
-      // console.log(this.moveRightData);
-      this.$refs.rightTable.clearSelection();
-    },
-    handleRightChange(val) {
-      let changeArr = [];
-      val.map((ele) => {
-        changeArr.push(ele.id);
-      });
-      this.moveLeftData = changeArr;
-      this.moveRightData = [];
-      this.$refs.leftTable.clearSelection();
-    },
-    init() {
-      this.getOilList();
-      this.getCoupon();
-      this.getVerificationList();
-    },
-    setPageStatus() {
-      this.queryPageStatus([2]).then((res) => {
-        this.pageStatus = res;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.createForm.pageNum = 1;
-      this.getList();
-    },
-    deviceNoInput(value) {
-      this.dialogForm.posQueue = value;
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("createForm");
-      this.handleQuery();
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.createForm = {
-        issueRemark: "",
-        issueName: "",
-        showIdList: [],
-        availableControl: "0",
-        appointedDaysList: [],
-        cycleDaysList: [],
-        issueType: "",
-        discountThresholdAmt: "0",
-        couponIssueRelationList: [],
-        giveLimit: 9,
-        giveCount: 999999,
-      };
-      this.title = "添加优惠券";
-      // this.createForm = {
-      //   couponName: "",
-      //   couponDetails: "",
-      //   couponThresholdAmt: 0,
-      //   couponType: "1",
-      //   couponAmt: 0,
-      //   oilNameList: [],
-      //   effectiveTimeType: "",
-      //   effectiveTime: [],
-      //   effectiveDayNum: 30,
-      //   couponHoldNum: 1,
-      //   couponReceiveNum: 100,
-      //   couponNum: 100,
-      //   status: "1",
-      //   couponIssueRelationList: [],
-      //   isCardFlag: "1",
-      //   isGradeFlag: "1",
-      //   isMarketFlag: "1",
-      // };
-      this.open = true;
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      // // 查找自己已经选中的枪号
-      this.createForm = JSON.parse(JSON.stringify(row));
-      this.title = "修改油站设备管理";
-      this.open = true;
-    },
-
-    /** 提交按钮 */
-    submitForm() {
-      console.log(123);
-      this.$refs["dialogForm"].validate((valid) => {
-        if (valid) {
-          if (!!this.createForm.id) {
-            updateIssue(this.createForm)
-              .then((res) => {
-                if (res.code == 200) {
-                  this.msgSuccess("亲,修改成功了~");
-                  this.getIssueList();
-                  this.open = false;
-                } else {
-                  throw new Error("");
-                }
-              })
-              .catch((err) => {
-                this.msgError("修改失败了呀~");
-              });
-          } else {
-            addIssue(this.createForm)
-              .then((res) => {
-                if (res.code == 200) {
-                  this.msgSuccess("亲,新增成功了~");
-                  this.getIssueList();
-                  this.open = false;
-                } else {
-                  throw new Error("");
-                }
-              })
-              .catch((err) => {
-                this.msgError("创建失败了~");
-              });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const deviceIds = row.deviceId;
-      this.$confirm("是否确认删除油站设备管理", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(function () {
-          return delManage(deviceIds);
-        })
-        .then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        });
-    },
+  methods: {
   },
 };
 </script>
 <style lang="scss">
-.el-transfer__buttons {
-}
 </style>

+ 4 - 478
src/views/coupon/Coupon_Statistics/issue.vue

@@ -1,11 +1,5 @@
 <template>
-  <div v-if="pageStatus == 0">配置加载中...</div>
-  <div v-else-if="pageStatus == 1">此页面不对此账号开放</div>
-  <div v-else-if="pageStatus == 2">
-    没有此页内容的配置权限,请检查集团上的配置
-  </div>
-  <div v-else-if="pageStatus == 3">加载发生错误</div>
-  <div v-else-if="pageStatus == 4" class="app-container">
+  <div>
     <div>
        <el-form
         :model="queryForm"
@@ -143,23 +137,6 @@
             {{ scope.row.issueType == "3" ? "支付成功后的领取位" : "" }}
           </template>
         </af-table-column>
-        <!-- <af-table-column label="操作" align="left">
-          <template slot-scope="scope">
-            {{
-              scope.row.issueType == "1" || scope.row.issueType == "3"
-                ? "-------"
-                : ""
-            }}
-            <el-button
-              size="mini"
-              type="text"
-              icon="el-icon-download"
-              @click="handleExport(scope.row)"
-              v-if="scope.row.issueType == '2'"
-              >导出二维码、网址</el-button
-            >
-          </template>
-        </af-table-column> -->
         <af-table-column label="发放门槛" align="left">
           <template slot-scope="scope">
             {{
@@ -221,7 +198,6 @@
       />
     </div>
 
-    <!-- 添加或修改油站设备管理对话框 -->
     <el-dialog
       :title="title"
       :visible.sync="open"
@@ -314,120 +290,24 @@
       @pagination="queryCouponUserListByPage"
     />
     </el-dialog>
-
-    <el-dialog
-      :visible.sync="exportQrDialog"
-      width="600px"
-      append-to-body
-      title="导出标签"
-    >
-      <div>
-        <qr
-          :text="currentExport.text"
-          @downloadImg="downloadImg"
-          :name="currentExport.name + '活动二维码'"
-        >
-          <div>{{ currentExport.name }} 活动二维码<b></b></div>
-        </qr>
-        <!--
-        <div
-          style="text-align: center; margin-top: 15px"
-          v-clipboard:copy="currentExport.text"
-          v-clipboard:error="onCopyError"
-          v-clipboard:success="onCopySuccess"
-        >
-          👇点击复制网址👇
-        </div>
-        -->
-        <div
-          style="text-align: center; margin-top: 15px"
-          v-clipboard:copy="currentExport.text"
-          v-clipboard:error="onCopyError"
-          v-clipboard:success="onCopySuccess"
-        >
-          活动网址:{{ currentExport.text }}
-        </div>
-        <div
-          style="text-align: center"
-          v-clipboard:copy="currentExport.text"
-          v-clipboard:error="onCopyError"
-          v-clipboard:success="onCopySuccess"
-        >
-          👆点击复制网址👆
-        </div>
-      </div>
-    </el-dialog>
   </div>
 </template>
 
 <script>
-import {
-  listManage,
-  getManage,
-  delManage,
-  addManage,
-  updateManage,
-  exportManage,
-  changeManageStatus,
-} from "@/api/station/manage";
-import { listPrice } from "@/api/station/price";
 
-import Vue from "vue";
-import VueClipboard from "vue-clipboard2";
 
-import Qr from "@/components/QrCode";
-import Base64 from "@/utils/base64";
-
-Vue.use(VueClipboard);
 
 import {
-  addInfo,
   listInfo,
-  updateInfo,
-  changeCouponStatus,
-  addIssue,
   listIssue,
-  upIssueStatus,
   queryCouponUserList,
 } from "@/api/coupon";
-import SelectDay from "@/components/SelectDay";
-import settings from "@/settings";
 
 export default {
   name: "Coupon_CreateIssue",
   data() {
-    let validateGunNo = (rule, value, callback) => {
-      callback();
-    };
-    let validateAvailableControl = (rule, value, callback) => {
-      if (
-        this.createForm.availableControl == 1 ||
-        this.createForm.availableControl == 2
-      ) {
-        if (this.createForm.cycleDaysList.length == 0) {
-          callback(new Error("请选择时间"));
-          return;
-        }
-      }
-      if (this.createForm.availableControl == 3) {
-        if (this.createForm.appointedDaysList.length == 0) {
-          callback(new Error("请选择日期"));
-          return;
-        }
-      }
-      callback();
-    };
-    let validateCouponIssueRelationList = (rule, value, callback) => {
-      if (this.createForm.couponIssueRelationList.length == 0) {
-        callback(new Error("请选择优惠券"));
-      }
-      callback();
-    };
     return {
       dateRangeCreatedDate: [],
-      couponEnabledFlag: "1",
-      exportQrDialog: false,
-      pageStatus: 4,
       createForm: {
         issueRemark: "",
         issueName: "",
@@ -441,25 +321,8 @@ export default {
         giveLimit: 9,
         giveCount: 999999,
       },
-      currentExport: {
-        text: "error",
-        type: "你好",
-        name: "二维码",
-      },
       couponList: [],
-      oilNameList: [],
-      allVerificationList: [],
-      equipmentList: [],
-      // 油枪复选
-      allGunList: [],
-      // 已选的油枪
-      checkedGunList: [],
-      //设备状态
-      deviceStatusOptions: [],
-      //设备类型
-      deviceTypeOptions: [],
-      stationOptions: [],
-      // 弹出层标题
+ 
       title: "",
       // 是否显示弹出层
       open: false,
@@ -467,12 +330,6 @@ export default {
       total: 100,
       // 优惠券总条数
       userTotal: 100,
-      leftQuery: {},
-      rightQuery: {},
-      leftData: [],
-      rightData: [],
-      moveRightData: [],
-      moveLeftData: [],
        // 优惠券的信息
       couponUserList: [],
       // 查询参数
@@ -494,27 +351,6 @@ export default {
         pageNum: 1,
         pageSize: 10,
       },
-      // 表单校验
-      rules: {
-        availableControl: [
-          {
-            required: true,
-            message: "请选择有效期内时间控制",
-            trigger: "change",
-          },
-          { validator: validateAvailableControl, trigger: "change" },
-        ],
-        couponIssueRelationList: [
-          {
-            required: true,
-            message: "请选择优惠券",
-            trigger: "change",
-          },
-          { validator: validateCouponIssueRelationList, trigger: "change" },
-        ],
-      },
-      day: [],
-      cycle: [],
       issueList: [],
       timeSelect: [
         ,
@@ -555,98 +391,10 @@ export default {
       ],
     };
   },
-  components: {
-    SelectDay: SelectDay,
-    Qr: Qr,
-    VueClipboard: VueClipboard,
-  },
   created() {
-    console.log("哈哈");
-    console.log("settings", settings);
-    // this.init();
-    this.getCoupon();
-    // this.setPageStatus();
-    this.getIssueList();
-     
-  },
-  computed: {
-    toggleable() {
-      if (this.moveRightData.length === 0 && this.moveLeftData.length === 0) {
-        return true;
-      }
-      return false;
-    },
-    selectedCouponList() {
-      return this.couponList.filter((ele) => {
-        if (this.createForm.couponIssueRelationList == null) {
-          this.createForm.couponIssueRelationList = [];
-        }
-        return this.createForm.couponIssueRelationList.includes(ele.id);
-      });
-    },
-    unselectedCouponList() {
-      return this.couponList.filter((ele) => {
-        if (this.createForm.couponIssueRelationList == null) {
-          this.createForm.couponIssueRelationList = [];
-        }
-        return !!!this.createForm.couponIssueRelationList.includes(ele.id);
-      });
-    },
-    getTodayDateString() {
-      const date = new Date();
-      let y = date.getFullYear();
-      let m = date.getMonth().toString();
-      let s = date.getDate().toString();
-      m = "" + (m.length == 1 ? "0" : "") + m;
-      s = "" + (s.length == 1 ? "0" : "") + s;
-      console.log("" + h + ":" + m + ":" + s);
-      return "" + y + ":" + m + ":" + s;
-    },
+    this.init();
   },
   methods: {
-    couponIsUsedFotmat(row, column) {
-      if (row.couponIsUsed === "0") {
-        return "未使用";
-      } else if (row.couponIsUsed === "1") {
-        return "已使用";
-      }
-    },
-     couponIsEffectiveFotmat(row, column) {
-      if (row.couponIsEffective === "0") {
-        return "无效";
-      } else if (row.couponIsEffective === "1") {
-        return "有效";
-      }
-    },
-    onCopySuccess() {
-      this.msgSuccess("网址已经拷贝到剪切板");
-    },
-    onCopyError() {
-      this.msgError("网址拷贝失败,请手动复制");
-    },
-    // exportUrl(url){
-    //   this.currentExport.name = emp.personnelName;
-    //   this.currentExport.type = 1;
-
-    //   const encodeStr = "e" + emp.personnelId + "/l" + this.currentExport.labelId + "/";
-    //   const encodedStr = this.base.encode(encodeStr);
-    //   const trimEqualStr = encodedStr.replace(/={1,}$/g, "");
-    //   this.currentExport.text = "https://goto.huijy.net/" + this.deptId + "/" + trimEqualStr;
-    //   this.exportQrDialog = true;
-    // },
-    handleExport(row) {
-      this.currentExport.name = row.issueName;
-      const base64 = Base64.getInstance();
-      const encodeStr = "i" + row.id;
-      const encodedStr = base64.encode(encodeStr);
-      const trimEqualStr = encodedStr.replace(/={1,}$/g, "");
-      this.exportQrDialog = true;
-      this.currentExport.text =
-        settings.baseURL + this.deptId + "/" + trimEqualStr;
-    },
-    downloadImg() {
-      console.log('');
-    },
     translateTime(row) {
       let timeString = "";
       const availableControleType = row.availableControl;
@@ -714,126 +462,9 @@ export default {
           this.msgError("亲,拉取优惠券列表失败~");
         });
     },
-    availableControlChange() {
-      this.createForm.appointedDaysList = [];
-      this.createForm.cycleDaysList = [];
-      this.createForm = { ...this.createForm };
-    },
-    handleMoveLabel(direction, row) {
-      console.log(row);
-      if (this.createForm.couponIssueRelationList == null) {
-        this.createForm.couponIssueRelationList = [];
-      }
-
-      if (direction == "right") {
-        this.createForm.couponIssueRelationList.push(row.id);
-      } else {
-        this.createForm.couponIssueRelationList =
-          this.createForm.couponIssueRelationList.filter((ele) => {
-            return ele != row.id;
-          });
-      }
-    },
-    handleFlagChange() {
-      const that = this;
-      let text = this.couponEnabledFlag === "1" ? "启用" : "停用";
-      this.$confirm('确认要"' + text + '"优惠券功能吗?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(function () {
-          return changeCouponStatus({
-            deptId: that.deptId,
-            couponEnabledFlag: that.couponEnabledFlag,
-          });
-        })
-        .then(() => {
-          that.msgSuccess(text + "成功");
-        })
-        .catch(function () {
-          that.couponEnabledFlag = that.couponEnabledFlag === "0" ? "1" : "0";
-        });
-    },
-    handleStatusChange(row) {
-      let text = row.status === "1" ? "启用" : "停用";
-      this.$confirm(
-        '确认要"' + text + '""' + row.issueName + '"发放方式吗?',
-        "警告",
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }
-      )
-        .then(function () {
-          return upIssueStatus({
-            id: row.id,
-            status: row.status,
-          });
-        })
-        .then(() => {
-          this.msgSuccess(text + "成功");
-        })
-        .catch(function () {
-          row.status = row.status === "0" ? "1" : "0";
-        });
-    },
-    toggleLabel() {
-      if (this.moveLeftData.length !== 0) {
-        this.createForm.couponIssueRelationList =
-          this.createForm.couponIssueRelationList.filter((ele) => {
-            return ele != this.moveLeftData;
-          });
-        this.createForm = { ...this.createForm };
-        return;
-      }
-      if (this.moveRightData.length !== 0) {
-        this.createForm.couponIssueRelationList = [
-          ...new Set(
-            this.createForm.couponIssueRelationList.concat(this.moveRightData)
-          ),
-        ].filter((ele) => {
-          return !!ele;
-        });
-        this.createForm = { ...this.createForm };
-        return;
-      }
-      return;
-    },
-    handleLeftChange(val) {
-      let changeArr = [];
-      val.map((ele) => {
-        changeArr.push(ele.id);
-      });
-      console.log(changeArr);
-      this.moveLeftData = [];
-      this.moveRightData = changeArr;
-      // console.log(this.moveRightData);
-      this.$refs.rightTable.clearSelection();
-    },
-    handleRightChange(val) {
-      let changeArr = [];
-      val.map((ele) => {
-        changeArr.push(ele.id);
-      });
-      this.moveLeftData = changeArr;
-      this.moveRightData = [];
-      this.$refs.leftTable.clearSelection();
-    },
     init() {
-      this.getOilList();
       this.getCoupon();
-      this.getVerificationList();
-    },
-    setPageStatus() {
-      this.queryPageStatus([2]).then((res) => {
-        this.pageStatus = res;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
+      this.getIssueList();
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -841,62 +472,12 @@ export default {
       this.queryForm.pageSize=10;
       this.getIssueList();
     },
-    deviceNoInput(value) {
-      this.dialogForm.posQueue = value;
-    },
     /** 重置按钮操作 */
     resetQuery() {
        this.resetForm("queryForm");
       this.dateRangeCreatedDate = [];
       this.handleQuery();
     },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.createForm = {
-        issueRemark: "",
-        issueName: "",
-        showIdList: [],
-        availableControl: "0",
-        appointedDaysList: [],
-        cycleDaysList: [],
-        issueType: "",
-        discountThresholdAmt: "0",
-        couponIssueRelationList: [],
-        giveLimit: 9,
-        giveCount: 999999,
-      }
-      
-      ;
-      this.title = "添加优惠券";
-      // this.createForm = {
-      //   couponName: "",
-      //   couponDetails: "",
-      //   couponThresholdAmt: 0,
-      //   couponType: "1",
-      //   couponAmt: 0,
-      //   oilNameList: [],
-      //   effectiveTimeType: "",
-      //   effectiveTime: [],
-      //   effectiveDayNum: 30,
-      //   couponHoldNum: 1,
-      //   couponReceiveNum: 100,
-      //   couponNum: 100,
-      //   status: "1",
-      //   couponIssueRelationList: [],
-      //   isCardFlag: "1",
-      //   isGradeFlag: "1",
-      //   isMarketFlag: "1",
-      // };
-      this.open = true;
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      
-      this.createForm = JSON.parse(JSON.stringify(row));
-      this.title = "用户优惠券信息";
-      this.open = true;
-    },
-
      /** 查看优惠券信息 */
     handlequeryCouponUserList(row) {
       console.log(row);
@@ -926,63 +507,8 @@ export default {
       });
       
     },
-    /** 提交按钮 */
-    submitForm() {
-      console.log(123);
-      this.$refs["dialogForm"].validate((valid) => {
-        if (valid) {
-          if (!!this.createForm.id) {
-            updateIssue(this.createForm)
-              .then((res) => {
-                if (res.code == 200) {
-                  this.msgSuccess("亲,修改成功了~");
-                  this.getIssueList();
-                  this.open = false;
-                } else {
-                  throw new Error("");
-                }
-              })
-              .catch((err) => {
-                this.msgError("修改失败了呀~");
-              });
-          } else {
-            addIssue(this.createForm)
-              .then((res) => {
-                if (res.code == 200) {
-                  this.msgSuccess("亲,新增成功了~");
-                  this.getIssueList();
-                  this.open = false;
-                } else {
-                  throw new Error("");
-                }
-              })
-              .catch((err) => {
-                this.msgError("创建失败了~");
-              });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const deviceIds = row.deviceId;
-      this.$confirm("是否确认删除油站设备管理", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(function () {
-          return delManage(deviceIds);
-        })
-        .then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        });
-    },
   },
 };
 </script>
 <style lang="scss">
-.el-transfer__buttons {
-}
 </style>

+ 7 - 400
src/views/coupon/Coupon_Statistics/model.vue

@@ -1,13 +1,7 @@
 <template>
-  <div v-if="pageStatus == 0">配置加载中...</div>
-  <div v-else-if="pageStatus == 1">此页面不对此账号开放</div>
-  <div v-else-if="pageStatus == 2">
-    没有此页内容的配置权限,请检查集团上的配置
-  </div>
-  <div v-else-if="pageStatus == 3">加载发生错误</div>
-  <div v-else-if="pageStatus == 4" class="app-container">
-   
-    <div v-if="couponEnabledFlag == 1">
+
+  <div>
+    <div>
      <el-form
         :model="queryForm"
         ref="queryForm"
@@ -230,9 +224,7 @@
         :autoScroll="true"
       />
     </div>
-    <div v-else style="text-align: center">
-      亲,您的油站暂未启动优惠券功能,呦~
-    </div>
+ 
 
     <!-- 添加或修改油站设备管理对话框 -->
 
@@ -243,8 +235,7 @@
       append-to-body
       status-icon
     >
-          <el-table :data="couponUserList">
-      <af-table-column label="油站名" align="center" prop="id" v-if="jiBie==0||jiBie==1"/>
+      <el-table :data="couponUserList">
       <af-table-column
         v-if="false"
         label="优惠券id"
@@ -332,76 +323,17 @@
 </template>
 
 <script>
-import { listPrice } from "@/api/station/price";
-import SelectDay from "@/components/SelectDay";
 
 import {
   addInfo,
-  verificationList,
   listInfo,
   updateInfo,
-  changeCouponStatus,
   queryCouponUserList,
 } from "@/api/coupon";
-import { updateDept } from "@/api/system/dept";
 
 export default {
   name: "Station_Equipment",
   data() {
-    let validateOilNameList = (rule, value, callback) => {
-      console.log(value);
-      if (value.length == 0) {
-        callback(new Error("请选择优惠券的使用油品"));
-        return;
-      }
-      callback();
-    };
-    let validateEffectiveTimeType = (rule, value, callback) => {
-      if (!value) {
-        callback(new Error("请填入有效时间"));
-        return;
-      }
-      if (value == 1) {
-        if (this.createForm.effectiveTime.length == 0) {
-          callback(new Error("请选择有效时间"));
-          return;
-        }
-      }
-      if (value == 2) {
-        if (!this.createForm.effectiveDayNum) {
-          callback(new Error("请填入有效天数"));
-          return;
-        }
-      }
-      callback();
-    };
-    let validateAvailableControl = (rule, value, callback) => {
-      if (
-        this.createForm.availableControl == 1 ||
-        this.createForm.availableControl == 2
-      ) {
-        if (this.createForm.cycleDaysList.length == 0) {
-          callback(new Error("请选择时间"));
-          return;
-        }
-      }
-      if (this.createForm.availableControl == 3) {
-        if (this.createForm.appointedDaysList.length == 0) {
-          callback(new Error("请选择日期"));
-          return;
-        }
-      }
-      callback();
-    };
-    // let validateVerificationList = (rule, value, callback)=>{
-    //   if(this.createForm.couponType == 3){
-    //     if(this.createForm.validateVerificationList.length == 0){
-    //       callback(new Error("请选择核销机构"));
-    //       return;
-    //     }
-    //   }
-    //   callback()
-    // };
     return {
         //创建优惠券的时间
       dateRangeCreatedDate: [],
@@ -432,8 +364,6 @@ export default {
         cycleDaysList: [],
       },
       couponList: [],
-      oilNameList: [],
-      allVerificationList: [],
       day: [],
       cycle: [],
 
@@ -476,29 +406,6 @@ export default {
         pageSize: 10,
 
       },
-      // 表单校验
-      rules: {
-        oilNameList: [
-          { required: true, message: "请选择适用油品", trigger: "change" },
-          { validator: validateOilNameList, trigger: "change" },
-        ],
-        effectiveTimeType: [
-          { required: true, message: "请输入有效期类型", trigger: "change" },
-          { validator: validateEffectiveTimeType, trigger: "change" },
-        ],
-        availableControl: [
-          {
-            required: true,
-            message: "请选择有效期内时间控制",
-            trigger: "change",
-          },
-          { validator: validateAvailableControl, trigger: "change" },
-        ],
-        // verificationList:[
-        //   { required: true, message: "请选择核销机构", trigger: "change" },
-        //   { validator: validateVerificationList, trigger: "change" },
-        // ],
-      },
       timeSelect: [
         ,
         ["周天", "周一", "周二", "周三", "周四", "周五", "周六"],
@@ -540,51 +447,10 @@ export default {
   },
   created() {
     this.init();
-    this.getCoupon();
-    this.setPageStatus();
   },
   computed: {
-    toggleable() {
-      if (this.moveRightData.length === 0 && this.moveLeftData.length === 0) {
-        return true;
-      }
-      return false;
-    },
-    selectedCouponList() {
-      return this.allVerificationList.filter((ele) => {
-        if (this.createForm.verificationList == null) {
-          this.createForm.verificationList = [];
-        }
-        return this.createForm.verificationList.includes(ele.deptId);
-      });
-    },
-    unselectedCouponList() {
-      return this.allVerificationList.filter((ele) => {
-        if (this.createForm.verificationList == null) {
-          this.createForm.verificationList = [];
-        }
-        return !!!this.createForm.verificationList.includes(ele.deptId);
-      });
-    },
-  },
-  components: {
-    SelectDay: SelectDay,
   },
   methods: {
-    couponIsUsedFotmat(row, column) {
-      if (row.couponIsUsed === "0") {
-        return "未使用";
-      } else if (row.couponIsUsed === "1") {
-        return "已使用";
-      }
-    },
-     couponIsEffectiveFotmat(row, column) {
-      if (row.couponIsEffective === "0") {
-        return "无效";
-      } else if (row.couponIsEffective === "1") {
-        return "有效";
-      }
-    },
     translateTime(row) {
       let timeString = "";
       const availableControleType = row.availableControl;
@@ -612,94 +478,6 @@ export default {
       timeString = timeString.replace(/(、)$/g, "") + "可以使用劵";
       return timeString;
     },
-    getTodayDateString() {
-      const date = new Date();
-      let y = date.getFullYear();
-      let m = date.getMonth().toString();
-      let s = date.getDate().toString();
-      m = "" + (m.length == 1 ? "0" : "") + m;
-      s = "" + (s.length == 1 ? "0" : "") + s;
-      console.log("" + h + ":" + m + ":" + s);
-      return "" + y + ":" + m + ":" + s;
-    },
-    availableControlChange() {
-      this.createForm.appointedDaysList = [];
-      this.createForm.cycleDaysList = [];
-      this.createForm = { ...this.createForm };
-    },
-    handleMoveLabel(direction, row) {
-      console.log(row);
-      if (this.createForm.verificationList == null) {
-        this.createForm.verificationList = [];
-      }
-
-      if (direction == "right") {
-        this.createForm.verificationList.push(row.deptId);
-      } else {
-        this.createForm.verificationList =
-          this.createForm.verificationList.filter((ele) => {
-            return ele != row.deptId;
-          });
-      }
-    },
-    handleFlagChange() {
-      const that = this;
-      let text = this.couponEnabledFlag === "1" ? "启用" : "停用";
-      this.$confirm('确认要"' + text + '"优惠券功能吗?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(function () {
-          return changeCouponStatus({
-            deptId: that.deptId,
-            couponEnabledFlag: that.couponEnabledFlag,
-          });
-        })
-        .then(() => {
-          that.msgSuccess(text + "成功");
-        })
-        .catch(function () {
-          that.couponEnabledFlag = that.couponEnabledFlag === "0" ? "1" : "0";
-        });
-    },
-    handleStatusChange(row) {
-      let text = row.status === "1" ? "启用" : "停用";
-      this.$confirm(
-        '确认要"' + text + '""' + row.couponName + '"该优惠券吗?',
-        "警告",
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }
-      )
-        .then(function () {
-          return updateInfo({
-            id: row.id,
-            status: row.status,
-          });
-        })
-        .then(() => {
-          this.msgSuccess(text + "成功");
-        })
-        .catch(function () {
-          row.status = row.status === "0" ? "1" : "0";
-        });
-    },
-    getOilList() {
-      listPrice()
-        .then((res) => {
-          if (res.code == 200) {
-            this.oilNameList = res.rows || [];
-          } else {
-            throw new Error("");
-          }
-        })
-        .catch((err) => {
-          this.msgError("亲,拉取油品列表失败~");
-        });
-    },
     getCoupon() {
       listInfo(this.queryForm)
         .then((res) => {
@@ -720,48 +498,6 @@ export default {
           this.msgError("亲,拉取优惠券列表失败~");
         });
     },
-    getVerificationList() {
-      verificationList({
-        pageNum: 1,
-        pageSize: 1000,
-      })
-        .then((res) => {
-          if (res.code == 200) {
-            if (res.rows == null) {
-              this.allVerificationList = [];
-            } else {
-              this.allVerificationList = res.rows;
-            }
-          } else {
-            throw new Error("");
-          }
-        })
-        .catch((err) => {
-          this.msgError("亲,拉取核销机构失败~");
-        });
-    },
-    toggleLabel() {
-      if (this.moveLeftData.length !== 0) {
-        this.createForm.verificationList =
-          this.createForm.verificationList.filter((ele) => {
-            return ele != this.moveLeftData;
-          });
-        this.createForm = { ...this.createForm };
-        return;
-      }
-      if (this.moveRightData.length !== 0) {
-        this.createForm.verificationList = [
-          ...new Set(
-            this.createForm.verificationList.concat(this.moveRightData)
-          ),
-        ].filter((ele) => {
-          return !!ele;
-        });
-        this.createForm = { ...this.createForm };
-        return;
-      }
-      return;
-    },
      /** 查看优惠券信息 */
     handlequeryCouponUserList(row) {
       this.queryCouponUserFrom.couponId=row;
@@ -777,9 +513,7 @@ export default {
       
     },
       /** 查看优惠券信息 */
-    queryCouponUserListByPage() {
-
-    
+    queryCouponUserListByPage() {    
      queryCouponUserList(
        this.queryCouponUserFrom
       ).then((response) => {
@@ -790,35 +524,8 @@ export default {
       });
       
     },
-    handleLeftChange(val) {
-      let changeArr = [];
-      val.map((ele) => {
-        changeArr.push(ele.deptId);
-      });
-      console.log(changeArr);
-      this.moveLeftData = [];
-      this.moveRightData = changeArr;
-      // console.log(this.moveRightData);
-      this.$refs.rightTable.clearSelection();
-    },
-    handleRightChange(val) {
-      let changeArr = [];
-      val.map((ele) => {
-        changeArr.push(ele.deptId);
-      });
-      this.moveLeftData = changeArr;
-      this.moveRightData = [];
-      this.$refs.leftTable.clearSelection();
-    },
     init() {
-      this.getOilList();
       this.getCoupon();
-      this.getVerificationList();
-    },
-    setPageStatus() {
-      this.queryPageStatus([2]).then((res) => {
-        this.pageStatus = res;
-      });
     },
     // 取消按钮
     cancel() {
@@ -850,114 +557,14 @@ export default {
           this.msgError("亲,拉取优惠券列表失败~");
         });
     },
-    deviceNoInput(value) {
-      this.createForm.posQueue = value;
-    },
     /** 重置按钮操作 */
     resetQuery() {
       this.dateRangeCreatedDate=[];
       this.resetForm("queryForm");
       this.handleQuery();
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.title = "添加优惠券";
-      this.createForm = {
-        couponRemark: "",
-        couponName: "",
-        couponDetails: "",
-        couponThresholdAmt: 0,
-        couponType: "1",
-        couponAmt: "",
-        oilNameList: [],
-        effectiveTimeType: "", //有效时间类型: 1,固定时间;2,领取后x天内有效
-        effectiveTime: [],
-        effectiveDayNum: 30,
-        couponHoldNum: 1,
-        couponReceiveNum: 100,
-        couponNum: 100,
-        status: "1",
-        verificationList: [],
-        isCardFlag: "1",
-        isGradeFlag: "1",
-        isMarketFlag: "1",
-        availableControl: "0",
-        appointedDaysList: [],
-        cycleDaysList: [],
-      };
-      this.open = true;
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      // // 查找自己已经选中的枪号
-      const createForm = JSON.parse(JSON.stringify(row));
-      if (createForm.appointedDaysList == null) {
-        createForm.appointedDaysList = [];
-      }
-      if (createForm.cycleDaysList == null) {
-        createForm.cycleDaysList = [];
-      }
-      this.createForm = createForm;
-      this.title = "修改油站设备管理";
-      this.open = true;
-    },
-
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["createForm"].validate((valid) => {
-        if (valid) {
-          if (!!this.createForm.id) {
-            updateInfo(this.createForm)
-              .then((res) => {
-                if (res.code == 200) {
-                  this.msgSuccess("亲,修改成功了~");
-                  this.getCoupon();
-                  this.open = false;
-                } else {
-                  throw new Error("");
-                }
-              })
-              .catch((err) => {
-                this.msgError("修改失败了呀~");
-              });
-          } else {
-            addInfo(this.createForm)
-              .then((res) => {
-                if (res.code == 200) {
-                  this.msgSuccess("亲,新增成功了~");
-                  this.getCoupon();
-                  this.open = false;
-                } else {
-                  throw new Error("");
-                }
-              })
-              .catch((err) => {
-                this.msgError("创建优惠劵失败了~");
-              });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      // const deviceIds = row.deviceId;
-      // this.$confirm("是否确认删除油站设备管理", "警告", {
-      //   confirmButtonText: "确定",
-      //   cancelButtonText: "取消",
-      //   type: "warning",
-      // })
-      //   .then(function () {
-      //     return delManage(deviceIds);
-      //   })
-      //   .then(() => {
-      //     this.getList();
-      //     this.msgSuccess("删除成功");
-      //   });
-    },
+    }
   },
 };
 </script>
 <style lang="scss">
-.el-transfer__buttons {
-}
 </style>

+ 2 - 38
src/views/coupon/Coupon_Statistics/realTime.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="app-container">
+  <div>
     <el-form
       :model="queryParams"
       ref="queryForm"
@@ -214,46 +214,10 @@ export default {
   },
   created() {
     this.getList();
-    queryCouponUserList({
-      pageNum: 1,
-      pageSize: 10,
-    }).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: {
  
-    couponIsUsedFotmat(row, column) {
-      if (row.couponIsUsed === "0") {
-        return "未使用";
-      } else if (row.couponIsUsed === "1") {
-        return "已使用";
-      } else if (row.couponIsUsed === "2") {
-        return "已核销";
-      }
-    },
-     couponIsEffectiveFotmat(row, column) {
-      if (row.couponIsEffective === "0") {
-        return "无效";
-      } else if (row.couponIsEffective ==="1") {
-        return "有效";
-      }
-    },
     /** 查询订单支付列表 */
     getList() {
       this.queryParams.levelId = this.levelId