Explorar o código

领取方式的状态

Joe %!s(int64=3) %!d(string=hai) anos
pai
achega
def1940008

+ 1 - 1
src/api/coupon.js

@@ -94,7 +94,7 @@ export function listIssue(query) {
 export function upIssueStatus(data) {
   return request({
     url: '/coupon/issue/updateCouponIssueStatus',
-    method: 'get',
+    method: 'put',
     data: data
   })
 }

+ 20 - 30
src/views/coupon/Coupon_CreateCoupon.vue

@@ -433,16 +433,6 @@
 </template>
 
 <script>
-import {
-  listManage,
-  getManage,
-  delManage,
-  addManage,
-  updateManage,
-  exportManage,
-  changeManageStatus,
-} from "@/api/station/manage";
-import { listGun } from "@/api/station/gun";
 import { listPrice } from "@/api/station/price";
 import SelectDay from "@/components/SelectDay";
 
@@ -464,7 +454,7 @@ export default {
         couponDetails: "",
         couponThresholdAmt: 0,
         couponType: "1",
-        couponAmt: 0,
+        couponAmt: '',
         oilNameList: [],
         effectiveTimeType: "", //有效时间类型: 1,固定时间;2,领取后x天内有效
         effectiveTime: [],
@@ -626,10 +616,7 @@ export default {
         });
     },
     getCoupon() {
-      listInfo({
-        pageNum: 1,
-        pageSize: 10,
-      })
+      listInfo(this.queryForm)
         .then((res) => {
           if (res.code == 200) {
             console.log(res);
@@ -745,9 +732,9 @@ export default {
         couponDetails: "",
         couponThresholdAmt: 0,
         couponType: "1",
-        couponAmt: 0,
+        couponAmt: '',
         oilNameList: [],
-        effectiveTimeType: "", 
+        effectiveTimeType: "", //有效时间类型: 1,固定时间;2,领取后x天内有效
         effectiveTime: [],
         effectiveDayNum: 30,
         couponHoldNum: 1,
@@ -758,6 +745,9 @@ export default {
         isCardFlag: "1",
         isGradeFlag: "1",
         isMarketFlag: "1",
+        availableControl:"0",
+        appointedDaysList:[], 
+        cycleDaysList:[],
       }
       this.open = true;
     },
@@ -804,19 +794,19 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const deviceIds = row.deviceId;
-      this.$confirm("是否确认删除油站设备管理", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(function () {
-          return delManage(deviceIds);
-        })
-        .then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        });
+      // const deviceIds = row.deviceId;
+      // this.$confirm("是否确认删除油站设备管理", "警告", {
+      //   confirmButtonText: "确定",
+      //   cancelButtonText: "取消",
+      //   type: "warning",
+      // })
+      //   .then(function () {
+      //     return delManage(deviceIds);
+      //   })
+      //   .then(() => {
+      //     this.getList();
+      //     this.msgSuccess("删除成功");
+      //   });
     },
   },
 };

+ 12 - 0
src/views/coupon/Coupon_CreateIssue.vue

@@ -113,6 +113,14 @@
         :rules="rules"
         label-width="180px"
       >
+        <el-form-item label="发放方式名称" prop="issueName">
+          <input
+            type="text"
+            class="form-control"
+            v-model="createForm.issueName"
+            style="width: 180px"
+          />
+        </el-form-item>
         <el-form-item label="发放类型" prop="couponName">
           <el-radio-group v-model="createForm.issueType">
             <div>
@@ -321,6 +329,7 @@ export default {
 
       pageStatus: 4,
       createForm: {
+        issueName:'',
         showId: [],
         availableControl: "0",
         appointedDaysList: [],
@@ -408,8 +417,10 @@ export default {
       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 {
@@ -482,6 +493,7 @@ export default {
         });
     },
     handleStatusChange(row) {
+      console.log(row);
       let text = row.status === "1" ? "启用" : "停用";
       this.$confirm(
         '确认要"' + text + '""' + row.couponName + '"该优惠券吗?',