Browse Source

修改电子规则新增,修改明细问题

MS-QJVSRANLTYEO\Administrator 4 years ago
parent
commit
43ebf0d9c9

+ 19 - 5
Yijia-SaaS/yijia-ui/src/views/customer/cardSetting/index.vue

@@ -425,15 +425,30 @@ export default {
       this.resetForm("form");
 
     },
+    resetInfo() {
+      this.infoform = {
+        id: null,
+        parentId:null,
+        oilName: null,
+        discountAmtStart: null,
+        discountAmtEnd: null,
+        settingRuleType: null,
+        presentAmt: null
+      };
+      this.resetForm("infoform");
+
+    },
     /** 新增按钮操作 */
     handleAdd() {
+      this.resetInfo();
+      this.index1=null;
       this.open = true;
       this.title = "添加客户电子会员卡充值优惠设置";
       // this.infoform.status="1";
     },
     /** 修改按钮操作 */
     handleUpdate(index,row) {
-      this.index=index;
+      this.index1=index;
       this.infoform = row;
       this.open = true;
       this.title = "修改客户电子会员卡充值优惠设置";
@@ -612,7 +627,6 @@ export default {
       }
       // 删除数组元素
       this.collectClickWorkDay.remove(item);
-      console.log("this.collectClickWorkDay111",this.collectClickWorkDay);
     },
     clickWorkDayCalendar(item, index) {
       if (this.collectClickWorkDay.indexOf(index) === -1) {
@@ -629,7 +643,7 @@ export default {
         settingRuleType: null,
         presentAmt: null
       };
-      this.index=null;
+      this.index1=null;
       this.resetForm("infoform");
       this.open = false;
       this.jine=false;
@@ -639,8 +653,8 @@ export default {
       const that = this;
       this.$refs["infoform"].validate(valid => {
         if (valid) {
-          if(that.index!=null){
-            that.handleDelete(that.index);
+          if(that.index1!=null){
+            that.handleDelete(that.index1);
           }
           that.form.detailList.push(that.infoform);
         }

+ 2 - 2
Yijia-SaaS/yijia-ui/src/views/integral/rule/index.vue

@@ -12,8 +12,8 @@
           </el-select>
       </el-form-item>   -->
       <el-form-item style="float:right">
-        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">刷新</el-button>
+        <!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> -->
       </el-form-item>
     </el-form>
     <el-table v-loading="loading" :data="ruleList">