Procházet zdrojové kódy

设置全局组织机构管理

MS-QJVSRANLTYEO\Administrator před 4 roky
rodič
revize
b285668a36

+ 53 - 0
Yijia-SaaS/yijia-ui/src/api/customer/cardSetting.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询客户电子会员卡充值优惠设置列表
+export function listSetting(query) {
+  return request({
+    url: '/customer/cardsetting/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询客户电子会员卡充值优惠设置详细
+export function getSetting(id) {
+  return request({
+    url: '/customer/cardsetting/' + id,
+    method: 'get'
+  })
+}
+
+// 新增客户电子会员卡充值优惠设置
+export function addSetting(data) {
+  return request({
+    url: '/customer/cardsetting',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改客户电子会员卡充值优惠设置
+export function updateSetting(data) {
+  return request({
+    url: '/customer/cardsetting',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除客户电子会员卡充值优惠设置
+export function delSetting(id) {
+  return request({
+    url: '/customer/cardsetting/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出客户电子会员卡充值优惠设置
+export function exportSetting(query) {
+  return request({
+    url: '/customer/cardsetting/export',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
Yijia-SaaS/yijia-ui/src/api/customer/record.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询客户电子会员卡充值消费记录列表
+export function listRecord(query) {
+  return request({
+    url: '/customer/record/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询客户电子会员卡充值消费记录详细
+export function getRecord(id) {
+  return request({
+    url: '/customer/record/' + id,
+    method: 'get'
+  })
+}
+
+// 新增客户电子会员卡充值消费记录
+export function addRecord(data) {
+  return request({
+    url: '/customer/record',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改客户电子会员卡充值消费记录
+export function updateRecord(data) {
+  return request({
+    url: '/customer/record',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除客户电子会员卡充值消费记录
+export function delRecord(id) {
+  return request({
+    url: '/customer/record/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出客户电子会员卡充值消费记录
+export function exportRecord(query) {
+  return request({
+    url: '/customer/record/export',
+    method: 'get',
+    params: query
+  })
+}

+ 3 - 2
Yijia-SaaS/yijia-ui/src/api/station/pay.js

@@ -52,9 +52,10 @@ export function exportPay(query) {
   })
 }
 //根据油站id获取支付信息
-export function getStationPay() {
+export function getStationPay(query) {
   return request({
     url: '/station/pay/queryOne',
-    method: 'get'
+    method: 'get',
+    params: query
   })
 }

+ 77 - 37
Yijia-SaaS/yijia-ui/src/components/SelectDept/index.vue

@@ -1,5 +1,15 @@
 <template>
-    <treeselect style="width:180px;height:28px;position:relative; display: inline-block;" v-model="value" :options="options" />
+  <treeselect
+    style="
+      width: 180px;
+      height: 28px;
+      position: relative;
+      display: inline-block;
+    "
+    v-model="value"
+    :options="options"
+    :defaultExpandLevel="Infinity"
+  />
 </template>
 
 <script>
@@ -12,60 +22,90 @@ export default {
     return {
       value: null,
       options: [],
-      num:0
-    }
+      Infinity: 2,
+      num: 0,
+    };
   },
   watch: {
     // 监听deptId
-    'value': 'currDeptChange'
+    value: "currDeptChange",
   },
-   created() {
+  created() {
     this.getTreeselect();
   },
   methods: {
     /** 查询部门下拉树结构 */
     getTreeselect() {
-      userdepttree().then(response => {
+      userdepttree().then((response) => {
         this.options = response.data;
-        if(response.data!=null && response.data.length>0){
-          this.value=response.data[0].id;
-          this.$store.selectDeptName= response.data[0].label;
-          this.$store.selectDeptId= response.data[0].id;
+        if (response.data != null && response.data.length > 0) {
+          this.value = response.data[0].id;
+          this.$store.selectDeptName = response.data[0].label;
+          this.$store.selectDeptId = response.data[0].id;
         }
       });
     },
     currDeptChange(val) {
       if (val) {
-        this.$store.selectDeptId= val;
-        console.log("this.$refs.tag",this.$refs.tag);
-        console.log("this.$refs",this.$refs);
-         console.log("this.num1",this.num);
-        if(this.num>0){
-          console.log("this.num2",this.num);
-          //this.$router.go(2);
-         // location.reload();
+        this.$store.selectDeptId = val;
+        if (this.num > 0) {
+          let path = this.$route.path;
+          let visitedViews = this.$store.state.tagsView.visitedViews;
+          let stagpath = null;
+          const proArr = [];
+          for (let i = 0; i < visitedViews.length; i++) {
+            let view = visitedViews[i];
+            proArr.push(
+              this.$store.dispatch("tagsView/delCachedView", view).then(() => {
+                const { fullPath } = view;
+                if (path === fullPath) {
+                  stagpath = view;
+                } else {
+                  this.$nextTick(() => {
+                    this.$router.replace({
+                      path: "/redirect" + fullPath,
+                    });
+                  });
+                }
+              })
+            );
+          }
+          Promise.all(proArr).then(() => {
+            if (stagpath != null) {
+              this.$store
+                .dispatch("tagsView/delCachedView", stagpath)
+                .then(() => {
+                  const { fullPath } = stagpath;
+                  this.$nextTick(() => {
+                    this.$router.replace({
+                      path: "/redirect" + fullPath,
+                    });
+                  });
+                });
+            }
+          });
         }
-        this.num=this.num+1;
+        this.num = this.num + 1;
       }
     },
-  }
-}
+  },
+};
 </script>
 <style lang="scss">
-    .vue-treeselect__control{
-      height: 20px;
-      line-height: 26px;
-      font-size: 12px;
-      text-indent: 4px;
-    }
-    .vue-treeselect__menu-container {
-      position: absolute;
-      left: 0;
-      width: 100%;
-      overflow: visible;
-      transition: 0s;
-    }
-    .vue-treeselect__menu{
-      font-size: 12px;
-    }
+.vue-treeselect__control {
+  height: 20px;
+  line-height: 26px;
+  font-size: 12px;
+  text-indent: 4px;
+}
+.vue-treeselect__menu-container {
+  position: absolute;
+  left: 0;
+  width: 100%;
+  overflow: visible;
+  transition: 0s;
+}
+.vue-treeselect__menu {
+  font-size: 12px;
+}
 </style>

+ 427 - 0
Yijia-SaaS/yijia-ui/src/views/customer/cardSetting/index.vue

@@ -0,0 +1,427 @@
+<template>
+  <div class="app-container">
+    <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+      <el-form-item label="开通卡类型设置" >
+      </el-form-item>
+      <el-form-item prop="cardOilsType">
+        <el-checkbox-group v-model="form.cardOilsType">
+          <el-checkbox
+            v-for = "item in oilOptions"
+            :key="item.dictLabel"
+            :label="item.dictValue"
+            :value="item.dictValue"
+          >
+            {{item.dictLabel}}
+          </el-checkbox>
+        </el-checkbox-group>
+      </el-form-item>
+      <div>
+        <el-button type="primary" @click="handleAdd">设置充值规则</el-button>
+        <el-table v-loading="false" :data="detailList" >
+          <el-table-column label="id" align="center" prop="id" v-if="false" />
+          <el-table-column label="所对应电子会员卡ID" align="center" prop="parentId"  v-if="false" />
+          <el-table-column label="油品" align="center" prop="oilName"  :formatter="oilNameFormatter"/>
+          <el-table-column label="优惠条件金额" align="center" prop="discountAmtTerm" />
+          <el-table-column label="赠送方式" align="center" prop="settingRuleType"  :formatter="settingRuleTypeFotmat"/>
+          <el-table-column label="赠送金额值或比例" align="center" prop="presentAmt" />
+          <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="handleUpdate(scope.row)"
+              >修改</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="handleDelete(scope.row)"
+              >删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <el-form-item label="重置活动设置">
+      </el-form-item>
+      <el-form-item >
+       <el-radio-group v-model="form.discountTimeSetting">
+          <el-radio
+            v-for="dict in discountTimeSettingOptions"
+            :key="dict.dictValue"
+            :label="dict.dictValue"
+          >{{dict.dictLabel}}</el-radio>
+        </el-radio-group>
+      </el-form-item>  
+      <el-row>
+        <el-col :span="8" style="">
+          <el-form-item  label="日期选择" prop="datePicker">
+            <el-select v-model="form.datePicker" 
+             clearable size="small" @change="datePickerChang" >
+                <el-option
+                  v-for="item in datePickerOptions"
+                  :key="item.dictValue"
+                  :label="item.dictLabel"
+                  :value="item.dictValue"
+                ></el-option>
+              </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">  
+          <el-form-item v-show="workDaytrue">
+            <div style="display: flex;flex-wrap: wrap;border-style: solid;border-color:#F5F7FA">
+              <div v-for="(item, index) in workDay" :key="index" style="margin:3px;">
+                <div class="hover-style" style="border-radius:5px;font-weight:bold;font-size:12px;cursor: pointer;" @click="clickWorkDayCalendar(item, index)">
+                  <div>{{ item }}</div>
+                  <div v-if="collectClickWorkDay.indexOf(index) > -1" style="width:4px;height:4px;border-radius:50%;background-color:red;position: relative;left:calc(50% - 2px);"></div>
+                  <div v-else style="width:4px;height:4px;"></div>
+                </div>
+              </div>
+             </div>
+          </el-form-item>
+          <el-form-item v-show="moonDaytrue" >
+             <div style="display: flex;flex-wrap: wrap;border-style: solid;border-color:#F5F7FA">
+              <div v-for="(item, index) in moonEverDay" :key="index" style="margin:3px;">
+                <div class="hover-style" style="border-radius:5px;font-weight:bold;font-size:12px;cursor: pointer;" @click="clickCalendar(item, index)">
+                  <div>{{ item }}</div>
+                  <div v-if="collectClickCalendar.indexOf(index) > -1" style="width:4px;height:4px;border-radius:50%;background-color:red;position: relative;left:calc(50% - 2px);"></div>
+                  <div v-else style="width:4px;height:4px;"></div>
+                </div>
+              </div>
+             </div>
+          </el-form-item>
+          <el-form-item  v-show="datetrue">
+            <el-date-picker clearable size="small" style="margin-left: 10px;width: 200px"
+                            v-model="pickerTime"
+                            type="dates"
+                            value-format="yyyy-MM-dd"
+                            placeholder="选择提醒时间设置">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="赠送比例" prop="presentScale">
+            <el-input v-model="form.presentScale" placeholder="请输入赠送比例" />
+          </el-form-item>
+        </el-col>
+      </el-row>  
+      <el-form-item label="支付设置" ></el-form-item>
+      <el-row>
+        <el-form-item label="是否可以使用优惠券">
+        </el-form-item>
+      </el-row>
+      <el-row>
+        <el-form-item  prop="isDiscountCoupon">
+          <el-radio-group v-model="form.isDiscountCoupon">
+            <el-radio
+              v-for="dict in isDiscountCouponOptions"
+              :key="dict.dictValue"
+              :label="dict.dictValue"
+            >{{dict.dictLabel}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-row>
+      <el-row>
+          <el-form-item label="积分可享受倍数" prop="enjoyIntegralMultiple">
+            <el-input v-model="form.enjoyIntegralMultiple" placeholder="请输入积分可享受倍数" />
+          </el-form-item>
+      </el-row>
+      <el-form-item label="油站ID" prop="stationId" v-show="false">
+        <el-input v-model="form.stationId" placeholder="请输入油站ID" />
+      </el-form-item>
+      <el-form-item label="油站名称" prop="stationName" v-show="false">
+        <el-input v-model="form.stationName" placeholder="请输入油站名称" />
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="submitForm">确 定</el-button>
+      <el-button @click="cancel">取 消</el-button>
+    </div>
+
+     <!-- 添加或修改客户电子会员卡充值优惠设置明细对话框 -->
+    <el-dialog :title="title" :visible.sync="open"  append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
+        <el-form-item label="选择油品" prop="oilName">
+          <el-select
+            v-model="form.oilName"
+            placeholder="请选择油品"
+            clearable
+            size="small"
+          >
+          <el-option
+            v-for="item in oilOptions"
+            :key="item.dictLabel"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="充值条件金额" prop="discountAmtTerm">
+          <span>初始值</span>
+          <el-input-number v-model="form.discountAmtStart" placeholder="请输入充值条件开始金额" style="width:100px;" /> 
+          <span>终止值</span>
+          <el-input-number v-model="form.discountAmtEnd" placeholder="请输入充值条件结束金额" style="width:100px;"/> 
+        </el-form-item>
+        <el-form-item label="赠送方式"></el-form-item>
+        <el-row>
+          <el-col>
+            <el-form-item >
+              <el-select v-model="form.settingRuleType" placeholder="请选择设置充值优惠类型:1,按赠送金额;2,按赠送比例">
+                <el-option label="请选择字典生成" value="" />
+              </el-select>
+            
+            </el-form-item>
+          </el-col>
+          <el-col>
+            <el-form-item>
+              <el-input v-model="form.presentAmt" placeholder="请输入赠送金额值或者赠送c充值金额的比例" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">设置</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {  getSetting, delSetting, addSetting, updateSetting } from "@/api/customer/cardSetting";
+
+export default {
+  name: "Setting",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 客户电子会员卡充值优惠设置表格数据
+      settingList: [],
+      detailList:[],
+      oilOptions:[],
+      isDiscountCouponOptions:[],
+      discountTimeSettingOptions:[],
+      collectClickCalendar: [], // 收集固定日期选择的日子
+      collectClickWorkDay:[],
+      datePickerOptions :[],
+      moonEverDay: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10',
+      '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
+      '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],
+      workDay:["周天","周一","周二","周三","周四","周五","周六"],
+      workDaytrue:false,
+      moonDaytrue:false,
+      datetrue:false,
+      // 弹出层标题
+      title: "",
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getDicts("integral_manage").then(response => {
+      this.discountTimeSettingOptions = response.data;
+    });
+    this.getDicts("date_picker").then(response => {
+      this.datePickerOptions = response.data;
+    });
+    this.getDicts("is_flag").then(response => {
+      this.isDiscountCouponOptions = response.data;
+    });
+    this.getDicts("oil").then(response => {
+      this.oilOptions = response.data;
+    });
+  },
+  methods: {
+     oilNameFormatter(row, column){
+      if(row.oilName === '1'){
+        return '汽油'
+      }else if(row.oilName === '2'){
+        return '柴油'
+      }
+    },
+    settingRuleTypeFotmat(row, column){
+      if(row.settingRuleType === '1'){
+        return '按赠送金额'
+      }else if(row.settingRuleType === '2'){
+        return '按赠送比例'
+      }
+    },
+    datePickerChang(){
+      if(this.form.datePicker == "1"){
+        this.workDaytrue=true;
+        this.moonDaytrue=false;
+        this.datetrue=false;
+      }else if(this.form.datePicker == "2"){
+        this.workDaytrue=false;
+        this.moonDaytrue=true;
+        this.datetrue=false;
+      }else if(this.form.datePicker == "3"){
+        this.workDaytrue=false;
+        this.moonDaytrue=false;
+        this.datetrue=true;
+      }
+    },
+    // 取消按钮
+    cancel() {
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        cardOilsType: null,
+        discountTimeSetting: null,
+        discountTime: null,
+        presentScale: null,
+        isDiscountCoupon: null,
+        enjoyIntegralMultiple: null,
+        stationId: null,
+        stationName: null,
+        createTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+   
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加客户电子会员卡充值优惠设置";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getSetting(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改客户电子会员卡充值优惠设置";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            let datepicker = this.form.datePicker;
+            if(datepicker=="1"){
+              this.form.discountTime=this.collectClickWorkDay.toString();
+            }else if(datepicker=="2"){
+              this.form.discountTime=this.collectClickCalendar.toString();
+            }else{
+              this.form.discountTime = this.pickerTime.toString();
+            }
+            updateSetting(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            let datepicker = this.form.datePicker;
+            if(datepicker=="1"){
+              this.form.discountTime=this.collectClickWorkDay.toString();
+            }else if(datepicker=="2"){
+              this.form.discountTime=this.collectClickCalendar.toString();
+            }else{
+              this.form.discountTime = this.pickerTime.toString();
+            }
+            addSetting(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除客户电子会员卡充值优惠设置编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delSetting(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+    },
+     deleteItemFromArr(item) {
+      // eslint-disable-next-line
+      Array.prototype.indexOf = function(val) {
+        for (var i = 0; i < this.length; i++) {
+          if (this[i] === val) {
+            return i
+          }
+        }
+        return -1
+      }
+      // 通过索引删除数组元素
+      Array.prototype.remove = function(val) {
+        var index = this.indexOf(val)
+        if (index > -1) {
+          this.splice(index, 1)
+        }
+      }
+      // 删除数组元素
+      this.collectClickCalendar.remove(item)
+    },
+    clickCalendar(item, index) {
+      console.log('item, index:', item, index)
+      if (this.collectClickCalendar.indexOf(index) === -1) {
+        this.collectClickCalendar.push(index)
+      } else if (this.collectClickCalendar.indexOf(index) > -1) {
+        this.deleteItemFromArr(index)
+      }
+    },
+    deleteWorkDayFromArr(item) {
+      Array.prototype.indexOf = function(val) {
+        for (var i = 0; i < this.length; i++) {
+          if (this[i] === val) {
+            return i
+          }
+        }
+        return -1
+      }
+      // 通过索引删除数组元素
+      Array.prototype.remove = function(val) {
+        var index = this.indexOf(val)
+        if (index > -1) {
+          this.splice(index, 1)
+        }
+      }
+      // 删除数组元素
+      this.collectClickWorkDay.remove(item)
+    },
+    clickWorkDayCalendar(item, index) {
+      if (this.collectClickWorkDay.indexOf(index) === -1) {
+        this.collectClickWorkDay.push(index)
+      } else if (this.collectClickWorkDay.indexOf(index) > -1) {
+        this.deleteWorkDayFromArr(index)
+      }
+    }
+  }
+};
+</script>

+ 207 - 0
Yijia-SaaS/yijia-ui/src/views/customer/record/consumption.vue

@@ -0,0 +1,207 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="客户名" prop="customerName">
+        <el-input
+          v-model="queryParams.customerName"
+          placeholder="请输入客户名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+     <el-form-item label="油品" prop="cardOilsType">
+        <el-select
+          v-model="queryParams.cardOilsType"
+          placeholder="请选择油品"
+          clearable
+          size="small"
+        >
+          <el-option
+            v-for="item in oilOptions"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="充值时间" prop="">
+        <el-date-picker
+          v-model="dateRangeCreatedDate"
+          type="daterange"
+          unlink-panels
+          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 icon="el-icon-refresh" size="mini" @click="resetQuery">汇总</el-button>
+        <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['customer:record:export']" >导出</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="id" align="center" prop="id" v-if="false" />
+      <el-table-column label="消费单号" align="center" prop="orderNo" />
+      <el-table-column label="微信用户唯一标识" align="center" prop="unionId" v-if="false" />
+      <el-table-column label="会员号ID" align="center" prop="customerNo" />
+      <el-table-column label="会员名" align="center" prop="customerName" />
+      <el-table-column label="油品" align="center" prop="cardOilsType" formatter="cardOilsTypeFotmat"/>
+      <el-table-column label="电子会员卡消费充值类型:+,充值;-,消费;" align="center" prop="usageType" v-if="false" />
+      <el-table-column label="电子会员卡充值消费类型:1.微信;2.POS机" align="center" prop="payType" v-if="false"/>
+      <el-table-column label="消费金额" align="center" prop="amt" />
+      <el-table-column label="赠送金额" align="center" prop="presentAmt" v-if="false"/>
+      <el-table-column label="余额" align="center" prop="balance"  />
+      <el-table-column label="油站ID" align="center" prop="stationId" v-if="false"/>
+      <el-table-column label="油站名称" align="center" prop="stationName" v-if="false"/>
+      <el-table-column label="是否充值或者消费成功:0,未成功;1,成功" align="center" prop="status" v-if="false"/>
+    </el-table>
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import { listRecord, exportRecord } from "@/api/customer/record";
+
+export default {
+  name: "Record",
+  data() {
+    return {
+      //创建订单时间间隔
+      dateRangeCreatedDate:[],
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 客户电子会员卡充值消费记录表格数据
+      recordList: [],
+      oilOptions:[],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        orderNo: null,
+        unionId: null,
+        customerNo: null,
+        customerName: null,
+        usageType: "-",
+        payType: null,
+        cardOilsType: null,
+        amt: null,
+        presentAmt: null,
+        balance: null,
+        stationId: null,
+        stationName: null, 
+        status: 1
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("oil").then(response => {
+      this.oilOptions = response.data;
+    });
+  },
+  methods: {
+    cardOilsTypeFotmat(row, column){
+      if(row.cardOilsType === '2'){
+        return '柴油'
+      }else if(row.cardOilsType === '1'){
+        return '汽油'
+      }
+    },
+    /** 查询客户电子会员卡充值消费记录列表 */
+    getList() {
+      this.loading = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
+      listRecord(this.addDateRange(this.queryParams, this.dateRangeCreatedDate)).then(response => {
+        this.recordList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        orderNo: null,
+        unionId: null,
+        customerNo: null,
+        customerName: null,
+        usageType: null,
+        payType: null,
+        cardOilsType: null,
+        amt: null,
+        presentAmt: null,
+        balance: null,
+        createTime: null,
+        stationId: null,
+        stationName: null,
+        status: "0"
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.queryParams.stationId= this.$store.selectDeptId;
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有客户电子会员卡充值记录数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportRecord(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    }
+  }
+};
+</script>

+ 216 - 0
Yijia-SaaS/yijia-ui/src/views/customer/record/recharge.vue

@@ -0,0 +1,216 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="客户名" prop="customerName">
+        <el-input
+          v-model="queryParams.customerName"
+          placeholder="请输入客户名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="油品" prop="cardOilsType">
+        <el-select
+          v-model="queryParams.cardOilsType"
+          placeholder="请选择油品"
+          clearable
+          size="small"
+        >
+          <el-option
+            v-for="item in oilOptions"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="充值时间" prop="">
+        <el-date-picker
+          v-model="dateRangeCreatedDate"
+          type="daterange"
+          unlink-panels
+          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 icon="el-icon-refresh" size="mini" @click="resetQuery">汇总</el-button>
+        <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['customer:record:export']" >导出</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="id" align="center" prop="id" v-if="false" />
+      <el-table-column label="充值单号" align="center" prop="orderNo" />
+      <el-table-column label="微信用户唯一标识" align="center" prop="unionId" v-if="false" />
+      <el-table-column label="会员号ID" align="center" prop="customerNo" />
+      <el-table-column label="会员名" align="center" prop="customerName" />
+      <el-table-column label="油品" align="center" prop="cardOilsType" formatter="cardOilsTypeFotmat"/>
+      <el-table-column label="电子会员卡消费充值类型:+,充值;-,消费;" align="center" prop="usageType" v-if="false" />
+    
+      <el-table-column label="消费金额" align="center" prop="amt" />
+      <el-table-column label="赠送金额" align="center" prop="presentAmt" v-if="false"/>
+      <el-table-column label="余额" align="center" prop="balance" />
+      <el-table-column label="消费方式" align="center" prop="payType" formatter="payTypeFotmat"/>
+      <el-table-column label="油站ID" align="center" prop="stationId" v-if="false"/>
+      <el-table-column label="油站名称" align="center" prop="stationName" v-if="false"/>
+      <el-table-column label="油站名称" align="center" prop="create_time" />
+    </el-table>
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import { listRecord, exportRecord } from "@/api/customer/record";
+
+export default {
+  name: "Record",
+  data() {
+    return {
+      //创建订单时间间隔
+      dateRangeCreatedDate:[],
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 客户电子会员卡充值消费记录表格数据
+      recordList: [],
+      oilOptions:[],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        orderNo: null,
+        unionId: null,
+        customerNo: null,
+        customerName: null,
+        usageType: "+",
+        payType: null,
+        cardOilsType: null,
+        amt: null,
+        presentAmt: null,
+        balance: null,
+        stationId: null,
+        stationName: null,
+        status: 1
+      },
+      
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("oil").then(response => {
+      this.oilOptions = response.data;
+    });
+  },
+  methods: {
+    payTypeFotmat(row, column){
+      if(row.payType === '1'){
+        return '小程序'
+      }else if(row.payType === '2'){
+        return 'POS'
+      }
+    },
+    cardOilsTypeFotmat(row, column){
+      if(row.cardOilsType === '1'){
+        return '汽油'
+      }else if(row.cardOilsType === '2'){
+        return '柴油'
+      }
+    },
+    /** 查询客户电子会员卡充值消费记录列表 */
+    getList() {
+      this.loading = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
+      listRecord(this.addDateRange(this.queryParams, this.dateRangeCreatedDate)).then(response => {
+        this.recordList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        orderNo: null,
+        unionId: null,
+        customerNo: null,
+        customerName: null,
+        usageType: null,
+        payType: null,
+        cardOilsType: null,
+        amt: null,
+        presentAmt: null,
+        balance: null,
+        createTime: null,
+        stationId: null,
+        stationName: null,
+        status: "0"
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.queryParams.stationId= this.$store.selectDeptId;
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有客户电子会员卡充值记录数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportRecord(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    }
+  }
+};
+</script>

+ 1 - 0
Yijia-SaaS/yijia-ui/src/views/integral/order/index.vue

@@ -52,6 +52,7 @@
       <el-table-column label="商品名称" align="center" prop="waresName" />
       <el-table-column label="微信唯一标识" align="center" prop="unionId"  v-if="false"/>
       <el-table-column label="会员名称" align="center" prop="customerName" />
+      <el-table-column label="手机号" align="center" prop="mobilePhone" />bu
       <el-table-column label="兑换数量" align="center" prop="exchangeNum" />
       <el-table-column label="兑换时间" align="center" prop="exchangeTime" width="180">
         <template slot-scope="scope">

+ 1 - 0
Yijia-SaaS/yijia-ui/src/views/integral/points/index.vue

@@ -165,6 +165,7 @@ export default {
      /** 查询用户积分明细列表 */
     getInfoList() {
       this.loadingInfo = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
       listRecord(this.query).then(response => {
         this.recordList = response.rows;
         this.totalInfo = response.total;

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

@@ -23,7 +23,7 @@
       <el-table-column label="油站id" align="center" prop="stationId" v-if="false"/>
       <el-table-column label="油站名称" align="center" prop="stationName" />
       <el-table-column label="有效期设置" align="center" prop="termDateManage" :formatter="termDateManageFormat"/>
-      <el-table-column label="清空积分时间" align="center" prop="emptyDate" width="180">
+      <el-table-column label="有效期时间" align="center" prop="emptyDate" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.emptyDate, '{y}-{m}-{d}') }}</span>
         </template>
@@ -68,7 +68,7 @@
 </template>
 
 <script>
-import { listRule, getRule, delRule, addRule, updateRule, exportRule } from "@/api/integral/rule";
+import { listRule, delRule, addRule, updateRule, exportRule } from "@/api/integral/rule";
 import {stationinfo} from "@/api/station/gun";
 export default {
   name: "Rule",

+ 169 - 22
Yijia-SaaS/yijia-ui/src/views/integral/ruledetail/index.vue

@@ -33,7 +33,7 @@
           >
             <el-form-item>
               <span>规则类型</span>
-              <el-select v-model="item.ruleType" placeholder="请选择油品" clearable size="small"  >
+              <el-select v-model="item.ruleType" placeholder="请选择规则" clearable size="small"  >
                 <el-option
                   v-for="item in ruleTypeOptions"
                   :key="item.dictValue"
@@ -43,7 +43,7 @@
               </el-select>
               <span>满</span>
               <el-input-number v-model="item.ruleTerms" :min="0" size="small" />
-              <span v-if="item.ruleType=='1'">L</span>
+              <span v-if="item.ruleType=='3'">L</span>
               <span v-else>元</span>
               <span>起累计 </span>
               <el-select v-model="item.oilName" placeholder="请选择油品" clearable size="small" @change="oilNameChang(index)" >
@@ -124,10 +124,8 @@
         <el-date-picker clearable size="small" style="width: 200px;margin-left: 10px;"
                         v-model="form.emptyDate"
                         type="date"
-                        value-format="yyyy-MM-dd"
-                        placeholder="选择清空积分时间">
+                        value-format="yyyy-MM-dd">
         </el-date-picker>
-        <span>清空积分</span>
       </el-form-item>
       <el-form-item label=  "到期提醒设置" prop="expirationReminder">
         <el-radio-group v-model="form.expirationReminder">
@@ -155,10 +153,45 @@
         </el-radio-group>
       </el-form-item>
       <el-row>
-        <el-col :span="8" style="margin-left: 80px;">
+        <el-col :span="8" style="">
           <el-form-item  label="日期选择" prop="datePicker">
+            <el-select v-model="form.datePicker" 
+             clearable size="small" @change="datePickerChang" >
+                <el-option
+                  v-for="item in datePickerOptions"
+                  :key="item.dictValue"
+                  :label="item.dictLabel"
+                  :value="item.dictValue"
+                ></el-option>
+              </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">  
+          <el-form-item v-show="workDaytrue">
+            <div style="display: flex;flex-wrap: wrap;border-style: solid;border-color:#F5F7FA">
+              <div v-for="(item, index) in workDay" :key="index" style="margin:3px;">
+                <div class="hover-style" style="border-radius:5px;font-weight:bold;font-size:12px;cursor: pointer;" @click="clickWorkDayCalendar(item, index)">
+                  <div>{{ item }}</div>
+                  <div v-if="collectClickWorkDay.indexOf(index) > -1" style="width:4px;height:4px;border-radius:50%;background-color:red;position: relative;left:calc(50% - 2px);"></div>
+                  <div v-else style="width:4px;height:4px;"></div>
+                </div>
+              </div>
+             </div>
+          </el-form-item>
+          <el-form-item v-show="moonDaytrue" >
+             <div style="display: flex;flex-wrap: wrap;border-style: solid;border-color:#F5F7FA">
+              <div v-for="(item, index) in moonEverDay" :key="index" style="margin:3px;">
+                <div class="hover-style" style="border-radius:5px;font-weight:bold;font-size:12px;cursor: pointer;" @click="clickCalendar(item, index)">
+                  <div>{{ item }}</div>
+                  <div v-if="collectClickCalendar.indexOf(index) > -1" style="width:4px;height:4px;border-radius:50%;background-color:red;position: relative;left:calc(50% - 2px);"></div>
+                  <div v-else style="width:4px;height:4px;"></div>
+                </div>
+              </div>
+             </div>
+          </el-form-item>
+          <el-form-item  v-show="datetrue">
             <el-date-picker clearable size="small" style="margin-left: 10px;width: 200px"
-                            v-model="form.datePicker"
+                            v-model="pickerTime"
                             type="dates"
                             value-format="yyyy-MM-dd"
                             placeholder="选择提醒时间设置">
@@ -210,7 +243,7 @@
 
 <script>
 import { getToken } from "@/utils/auth";
-import {getGun, stationinfo} from "@/api/station/gun";
+import { stationinfo} from "@/api/station/gun";
 import {  addRule, updateRule,oilNameList,gradeList,getRule } from "@/api/integral/rule";
 export default {
 name: "ruleDetail",
@@ -232,15 +265,20 @@ name: "ruleDetail",
       expirationOptions:[],
       integralDeductionOilOptions:[],
       integralActivityOptions:[],
+      datePickerOptions:[],
       gradeOptions:[],
       imgInfoList: [], //包含图片的id,name,size的集合
       imgNameList: [], //后端返回的上传图片的name集合,传到后端
       imgSize: [], //后端返回的上传图片的imgSize集合,传到后端
       deleteImgFileList: [], //存已被删除了的图片的id
       dialogImageUrl: '',
+      pickerTime:"",
       dialogVisible: false,
       // 是否显示弹出层
       open: false,
+      workDaytrue:false,
+      moonDaytrue:false,
+      datetrue:false,
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -256,10 +294,19 @@ name: "ruleDetail",
         notOilList: [{}],
         imgFileList:[]
       },
+       query:{
+        deptId: null
+      },
       // 表单校验
       rules: {
       },
       headers: { Authorization: "Bearer " + getToken() },
+      collectClickCalendar: [], // 收集固定日期选择的日子
+      collectClickWorkDay:[],
+      moonEverDay: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10',
+      '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
+      '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],
+      workDay:["周天","周一","周二","周三","周四","周五","周六"],
       addressUrl: location.protocol+"//"+location.host+ process.env.VUE_APP_BASE_API+"/common/upload"
     };
   },
@@ -277,13 +324,25 @@ name: "ruleDetail",
           if(this.form.itemsDetail.length==0 ){
             this.form.itemsDetail=[{}];
           }
+          let datepicker = this.form.datePicker;
+          if(datepicker=="1"){
+            this.workDaytrue=true;
+            this.collectClickWorkDay= this.form.datePickerTime.split(',').map(parseFloat);
+          }else if(datepicker=="2"){
+            this.moonDaytrue=true;
+            this.collectClickCalendar= this.form.datePickerTime.split(',').map(parseFloat);
+          }else{
+            this.datetrue=true;
+            this.pickerTime = this.form.datePickerTime.split(',');
+          }
         });
         oilNameList(this.queryParams).then(response => {
           this.oilNameOptions = response.rows;
         });
       }
     }
-    stationinfo().then(response => {
+    this.query.deptId =this.$store.selectDeptId;
+    stationinfo(this.query).then(response => {
       this.stationOptions = response.rows;
     });
     this.getDicts("rule_type").then(response => {
@@ -301,6 +360,10 @@ name: "ruleDetail",
     this.getDicts("integral_manage").then(response => {
       this.integralActivityOptions = response.data;
     });
+    this.getDicts("date_picker").then(response => {
+      this.datePickerOptions = response.data;
+    });
+    
   },
   methods: {
     //添加行
@@ -359,7 +422,6 @@ name: "ruleDetail",
           console.log("gradeOptions", this.gradeOptions );
       });
     },
-
     handlePictureCardPreview(file) {
       console.log("file",file);
       this.dialogImageUrl = file.url;
@@ -398,25 +460,35 @@ name: "ruleDetail",
       this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.form.id != null) {
-            if(this.form.datePicker != null){
-              this.form.datePicker =this.form.datePicker.toString();
-            }
             if(this.form.notOilList!=null&&this.form.notOilList.length>0||this.form.notOilList[0].hasOwnProperty(saleAmt)){
-                if(this.form.notOilList[0].saleAmt==""||this.form.notOilList[0].saleAmt=="0" ||this.form.notOilList[0].saleAmt=="undefined"){
-                  this.form.notOilList=[];
-                }
+              if(this.form.notOilList[0].saleAmt==""||this.form.notOilList[0].saleAmt=="0" ||this.form.notOilList[0].saleAmt=="undefined"){
+                this.form.notOilList=[];
+              }
+            }
+            let datepicker = this.form.datePicker;
+            if(datepicker=="1"){
+              this.form.datePickerTime=this.collectClickWorkDay.toString();
+            }else if(datepicker=="2"){
+              this.form.datePickerTime=this.collectClickCalendar.toString();
+            }else{
+              this.form.datePickerTime = this.pickerTime.toString();
             }
             updateRule(this.form).then(response => {
               this.msgSuccess("修改成功");
             });
           } else {
-            if(this.form.datePicker != null){
-              this.form.datePicker =this.form.datePicker.toString();
+            let datepicker = this.form.datePicker;
+            if(datepicker=="1"){
+              this.form.datePickerTime=this.collectClickWorkDay.toString();
+            }else if(datepicker=="2"){
+              this.form.datePickerTime=this.collectClickCalendar.toString();
+            }else{
+              this.form.datePickerTime = this.pickerTime.toString();
             }
             if(this.form.notOilList!=null&&this.form.notOilList.length>0||this.form.notOilList[0].hasOwnProperty(saleAmt)){
-                if(this.form.notOilList[0].saleAmt==""||this.form.notOilList[0].saleAmt=="0" ||this.form.notOilList[0].saleAmt=="undefined"){
-                  this.form.notOilList=[];
-                }
+              if(this.form.notOilList[0].saleAmt==""||this.form.notOilList[0].saleAmt=="0" ||this.form.notOilList[0].saleAmt=="undefined"){
+                this.form.notOilList=[];
+              }
             }
             addRule(this.form).then(response => {
               this.msgSuccess("新增成功");
@@ -428,9 +500,84 @@ name: "ruleDetail",
     // 取消按钮
     cancel() {
       this.queryreset();
+    },
+    deleteItemFromArr(item) {
+      // eslint-disable-next-line
+      Array.prototype.indexOf = function(val) {
+        for (var i = 0; i < this.length; i++) {
+          if (this[i] === val) {
+            return i
+          }
+        }
+        return -1
+      }
+      // 通过索引删除数组元素
+      Array.prototype.remove = function(val) {
+        var index = this.indexOf(val)
+        if (index > -1) {
+          this.splice(index, 1)
+        }
+      }
+      // 删除数组元素
+      this.collectClickCalendar.remove(item)
+    },
+    clickCalendar(item, index) {
+      console.log('item, index:', item, index)
+      if (this.collectClickCalendar.indexOf(index) === -1) {
+        this.collectClickCalendar.push(index)
+      } else if (this.collectClickCalendar.indexOf(index) > -1) {
+        this.deleteItemFromArr(index)
+      }
+    },
+    deleteWorkDayFromArr(item) {
+      Array.prototype.indexOf = function(val) {
+        for (var i = 0; i < this.length; i++) {
+          if (this[i] === val) {
+            return i
+          }
+        }
+        return -1
+      }
+      // 通过索引删除数组元素
+      Array.prototype.remove = function(val) {
+        var index = this.indexOf(val)
+        if (index > -1) {
+          this.splice(index, 1)
+        }
+      }
+      // 删除数组元素
+      this.collectClickWorkDay.remove(item)
+    },
+    clickWorkDayCalendar(item, index) {
+      if (this.collectClickWorkDay.indexOf(index) === -1) {
+        this.collectClickWorkDay.push(index)
+      } else if (this.collectClickWorkDay.indexOf(index) > -1) {
+        this.deleteWorkDayFromArr(index)
+      }
+      console.log('当前收集的下标:', this.collectClickWorkDay)
+    },
+    datePickerChang(){
+      if(this.form.datePicker == "1"){
+        this.workDaytrue=true;
+        this.moonDaytrue=false;
+        this.datetrue=false;
+      }else if(this.form.datePicker == "2"){
+        this.workDaytrue=false;
+        this.moonDaytrue=true;
+        this.datetrue=false;
+      }else if(this.form.datePicker == "3"){
+        this.workDaytrue=false;
+        this.moonDaytrue=false;
+        this.datetrue=true;
+      }
     }
   },
 }
 </script>
+<style scoped>
+.hover-style:hover {
+  color: white;
+  background-color: blue;
+}
 
-
+</style>

+ 16 - 16
Yijia-SaaS/yijia-ui/src/views/integral/wares/index.vue

@@ -57,13 +57,13 @@
             @click="handleUpdate(scope.row)"
             v-hasPermi="['integral:wares:edit']"
           >修改</el-button>
-          <el-button
+          <!-- <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['integral:wares:remove']"
-          >删除</el-button>
+          >删除</el-button> -->
         </template>
       </el-table-column>
     </el-table>
@@ -310,20 +310,20 @@ export default {
         }
       });
     },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$confirm('是否确认删除商品编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delWares(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        })
-    },
+    // /** 删除按钮操作 */
+    // handleDelete(row) {
+    //   const ids = row.id || this.ids;
+    //   this.$confirm('是否确认删除商品编号为"' + ids + '"的数据项?', "警告", {
+    //       confirmButtonText: "确定",
+    //       cancelButtonText: "取消",
+    //       type: "warning"
+    //     }).then(function() {
+    //       return delWares(ids);
+    //     }).then(() => {
+    //       this.getList();
+    //       this.msgSuccess("删除成功");
+    //     })
+    // },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;

+ 21 - 16
Yijia-SaaS/yijia-ui/src/views/market/plan/index.vue

@@ -37,7 +37,7 @@
         </template>
       </el-table-column>
     </el-table>
-    <el-dialog :title="titlezj" :visible.sync="openzj" width="500px" append-to-body>
+    <el-dialog :title="titlezj" :visible.sync="openzj" width="550px" append-to-body>
       <el-form ref="zjform" :model="zjform" :rules="zjrules" label-width="130px">
         <el-form-item label="方案名称" prop="grade">
           <el-input v-model="zjform.grade" placeholder="请输入方案名称" />
@@ -158,8 +158,8 @@
         </template>
       </el-table-column>
     </el-table>
-    <!-- 添加或修改客户优惠等级设置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <!-- 添加或修改满减 -->
+    <el-dialog :title="title" :visible.sync="open"  width="550px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="130px">
         <el-form-item label="方案名称" prop="grade">
           <el-input v-model="form.grade" placeholder="请输入等级名称" />
@@ -194,10 +194,10 @@
           </el-select>
         </el-form-item>
         <el-form-item label="优惠条件" prop="discountTerm">
-            
+           
             <el-input-number v-model="form.discountAmt"  size="mini" :min="0"  />
-            减
-            <el-input-number v-model="form.gasoilDiscountAmt"   size="mini" :min="0" />
+            
+            <el-input-number v-model="form.gasoilDiscountAmt"   size="mini" :min="0" />
         </el-form-item>
         <el-form-item label="会员优惠是否叠加" prop="vipDiscountyPlus">
           <el-radio-group v-model="form.vipDiscountyPlus">
@@ -266,8 +266,8 @@
         </template>
       </el-table-column>
     </el-table>
-    <!-- 添加或修改动态客户优惠等级设置对话框 -->
-    <el-dialog :title="title" :visible.sync="opendt" width="500px" append-to-body>
+    <!-- 添加或修改立减方案 -->
+    <el-dialog :title="title" :visible.sync="opendt" width="550px" append-to-body>
       <el-form ref="dtform" :model="dtform" :rules="dtrules" label-width="130px">
         <el-form-item label="方案名称" prop="grade">
           <el-input v-model="dtform.grade" placeholder="请输入等级名称" />
@@ -304,8 +304,9 @@
         <el-form-item label="优惠条件">
           <el-input-number v-model="dtform.discountAmt"  size="mini" :min="0"  />
-          减
+          
           <el-input-number v-model="dtform.gasoilDiscountAmt"   size="mini" :min="0" />
+          元
         </el-form-item>
 <!--        <el-form-item label="柴油优惠金额" prop="dieseloilDiscountAmt">
           <el-input v-model="dtform.dieseloilDiscountAmt" placeholder="请输入柴油优惠金额" />
@@ -375,8 +376,8 @@
         titlezj: "",
         // 是否显示弹出层
         open: false,
-        yuan: false,
-        laters: true,
+        yuan: true,
+        laters: false,
         opendt: false,
         openzj: false,
         // 查询参数
@@ -433,6 +434,9 @@
         dtform: {},
         zjform: {},
         ruleForm: {},
+        query:{
+          deptId: null
+        },
         // 表单校验
         rules: {
         },
@@ -462,19 +466,20 @@
       this.getDicts("oil_name").then(response => {
         this.oilNameOptions = response.data;
       });
-      stationinfo().then(response => {
+      this.query.deptId =this.$store.selectDeptId;
+      stationinfo(this.query).then(response => {
         this.stationOptions = response.rows;
       });
     },
     methods: {
       changeHandler(value) {
         if(value=="2"){
-          this.yuan=true;
-          this.laters=false;
+          this.yuan=false;
+          this.laters=true;
           this.zjform.discountTerm="2";
         }else if(value=="1"){
-          this.laters=true;
-          this.yuan=false;
+          this.laters=false;
+          this.yuan=true;
           this.zjform.discountTerm="1";
         }
       },

+ 0 - 4
Yijia-SaaS/yijia-ui/src/views/station/adjust/index.vue

@@ -65,7 +65,6 @@ export default {
         stationName: null,
         operator: null
       },
-      stationOptions:[],
       // 表单参数
       form: {},
       // 表单校验
@@ -75,9 +74,6 @@ export default {
   },
   created() {
     this.getList();
-    stationinfo().then(response => {
-      this.stationOptions = response.rows;
-    });
     this.getDicts("take_effect_status").then(response => {
       this.takeEffectStatusOptions = response.data;
     });

+ 3 - 2
Yijia-SaaS/yijia-ui/src/views/station/info/index.vue

@@ -282,11 +282,12 @@ export default {
     handleFileSuccess(response, file, fileList) {
       this.upload.isUploading = false;
       let imgurl=location.protocol+"//"+location.host+process.env.VUE_APP_BASE_API+response.fileName;
-      this.form.filePath = imgurl;
+      this.form.stationPic = imgurl;
       this.msgSuccess(response.msg);
     },
     handleAvatarSuccess(res, file) {
-      this.form.stationPic = res.url;
+      let imgurl=location.protocol+"//"+location.host+process.env.VUE_APP_BASE_API+res.fileName;
+      this.form.stationPic = imgurl;
     },
     beforeAvatarUpload(file) {
       const isJPG = file.type === 'image/jpeg';

+ 2 - 1
Yijia-SaaS/yijia-ui/src/views/station/manage/index.vue

@@ -218,7 +218,8 @@ export default {
     this.getDicts("device_type").then(response => {
       this.deviceTypeOptions = response.data;
     });
-    stationinfo().then(response => {
+    this.query.deptId =this.$store.selectDeptId;
+    stationinfo(this.query).then(response => {
       this.stationOptions = response.rows;
     });
   },

+ 28 - 10
Yijia-SaaS/yijia-ui/src/views/station/pay/index.vue

@@ -51,8 +51,9 @@
         </el-radio-group>
       </el-form-item>
       
-      <el-form-item label="公告信息" v-show="false" prop="notice" >
-          <el-input v-model="ruleForm.notice" placeholder="请输入公告信息" />
+      <el-form-item label="公告信息" prop="notice" >
+          <!-- <el-input v-model="ruleForm.notice" placeholder="请输入公告信息" /> -->
+          <textarea cols="40" rows="3" v-model="ruleForm.notice"  placeholder="请输入公告信息"></textarea>
         </el-form-item>
       <el-form-item label="电子会员卡">
         <el-radio-group v-model="ruleForm.cardEnabledFlag">
@@ -107,6 +108,15 @@
           >{{dict.dictLabel}}</el-radio>
         </el-radio-group>
       </el-form-item>
+      <el-form-item label="打印积分小票" >
+        <el-radio-group v-model="ruleForm.integralPrintFlag">
+          <el-radio
+            v-for="dict in integralPrintFlagOptions"
+            :key="dict.dictValue"
+            :label="dict.dictValue"
+          >{{dict.dictLabel}}</el-radio>
+        </el-radio-group>
+      </el-form-item>
     </el-form>
     <div slot="footer" class="dialog-footer">
       <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -131,12 +141,19 @@ export default {
       discountSettingOptions:[],
       stationOptions:[],
       isNoOilOptions:[],
+      integralPrintFlagOptions:[],
       deleteImgFileList: [], //存已被删除了的图片的id
       dialogImageUrl: '',
       dialogVisible: false,
       ruleForm:{
         imgFileList:[]
       },
+      queryParams: {
+        stationId: null
+      },
+      query:{
+        deptId: null
+      },
       // 表单校验
       rules: {
       },
@@ -149,7 +166,8 @@ export default {
     this.getDicts("image_photos_flag").then(response => {
       this.imagePhotosFlagOptions = response.data;
     });
-    stationinfo().then(response => {
+    this.query.deptId =this.$store.selectDeptId;
+    stationinfo(this.query).then(response => {
       this.stationOptions = response.rows;
     });
     this.getDicts("ws_print_flag").then(response => {
@@ -167,6 +185,9 @@ export default {
     this.getDicts("is_flag").then(response => {
       this.isNoOilOptions = response.data;
     });
+    this.getDicts("is_flag").then(response => {
+      this.integralPrintFlagOptions = response.data;
+    });
 
   },
   methods: {
@@ -207,7 +228,8 @@ export default {
     },
     /** 进入信息 */
     look() {
-      getStationPay().then(response => {
+      this.queryParams.stationId= this.$store.selectDeptId;
+      getStationPay(this.queryParams).then(response => {
         this.ruleForm = response.data;
         if(response.data.imgFileList==null){
           this.ruleForm.imgFileList=[];
@@ -221,16 +243,12 @@ export default {
           if (this.ruleForm.payId != null) {
             updatePay(this.ruleForm).then(response => {
               this.msgSuccess("修改成功");
-              getStationPay().then(response => {
-                this.ruleForm = response.data;
-              });
+              this.look();
             });
           } else {
             addPay(this.ruleForm).then(response => {
               this.msgSuccess("新增成功");
-              getStationPay().then(response => {
-                this.ruleForm = response.data;
-              });
+              this.look();
             });
           }
         }

+ 5 - 1
Yijia-SaaS/yijia-ui/src/views/station/price/index.vue

@@ -182,6 +182,9 @@ export default {
         stationNanme: null,
         date: null
       },
+      query:{
+        deptId: null
+      },
       stationOptions:[],
       // 表单参数
       form: {},
@@ -199,7 +202,8 @@ export default {
   },
   created() {
     this.getList();
-    stationinfo().then(response => {
+    this.query.deptId =this.$store.selectDeptId;
+    stationinfo(this.query).then(response => {
       this.stationOptions = response.rows;
     });
     this.getDicts("take_effect_status").then(response => {

+ 0 - 19
Yijia-SaaS/yijia-ui/src/views/station/summary/index.vue

@@ -19,21 +19,6 @@
                         end-placeholder="结束日期">
         </el-date-picker>
       </el-form-item>
-      <!-- <el-form-item label="油站名称" prop="stationId">
-        <el-select
-          v-model="queryParams.stationId"
-          placeholder="请选择油站"
-          clearable
-          size="small"
-        >
-          <el-option
-            v-for="item in stationOptions"
-            :key="item.stationId"
-            :label="item.stationName"
-            :value="item.stationId"
-          ></el-option>
-        </el-select>
-      </el-form-item> -->
       <el-form-item label="班结人" prop="classesMan">
         <el-input
           v-model="queryParams.classesMan"
@@ -125,7 +110,6 @@ export default {
       total: 0,
       // 【请填写功能名称】表格数据
       summaryList: [],
-      stationOptions: [],
       dateRangeCreatedDate: [],
       // 弹出层标题
       title: "",
@@ -203,9 +187,6 @@ export default {
   },
   created() {
     this.getList();
-    stationinfo().then(response => {
-      this.stationOptions = response.rows;
-    });
   },
   methods: {
     /** 查询【请填写功能名称】列表 */