Преглед на файлове

Merge remote-tracking branch 'origin/master'

XF--LRQYEJOKYDS\Administrator преди 4 години
родител
ревизия
fec6024c3b

+ 12 - 9
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerGradeSettingController.java

@@ -43,38 +43,41 @@ public class CustomerGradeSettingController extends BaseController
 
     /*
      * 新增成长规则
+     * @param jsonObject
      */
     @RequestMapping("/addGrouthRule")
+    @Log(title = "客户等级成长规则新增", businessType = BusinessType.INSERT)
     public AjaxResult addGrouthRule(@RequestBody  JSONObject jsonObject){
         Map<String, Object> params = new HashMap();
         params.put("grouthValueName", jsonObject.get("grouthValueName"));
         params.put("grouthValueConsume", jsonObject.get("grouthValueConsume"));
         params.put("grouthValue", jsonObject.get("grouthValue"));
-        int i = customerGradeSettingService.insertGrouthRule(params);
-        return toAjax(i);
+        return toAjax(customerGradeSettingService.insertGrouthRule(params));
     }
 
     /*
-     * 新增成长规则
+     * 编辑成长规则
+     * @param jsonObject
      */
     @RequestMapping("/editGrouthRule")
+    @Log(title = "客户等级成长编辑", businessType = BusinessType.UPDATE)
     public AjaxResult editGrouthRule(@RequestBody  JSONObject jsonObject){
         Map<String, Object> params = new HashMap();
         params.put("id", jsonObject.get("id"));
         params.put("grouthValueName", jsonObject.get("grouthValueName"));
         params.put("grouthValueConsume", jsonObject.get("grouthValueConsume"));
         params.put("grouthValue", jsonObject.get("grouthValue"));
-        int i = customerGradeSettingService.updateGrouthRule(params);
-        return toAjax(i);
+        return toAjax(customerGradeSettingService.updateGrouthRule(params));
     }
 
     /*
      * 删除成长规则
+     * @param id
      */
-    @RequestMapping("/delGrouthRule")
-    public AjaxResult delGrouthRule(@PathVariable Long[] ids){
-        int i = customerGradeSettingService.deleteGrouthRuleByIds(ids);
-        return toAjax(i);
+    @Log(title = "客户等级成长规则删除", businessType = BusinessType.DELETE)
+    @RequestMapping(value = "/delGrouthRule",method = RequestMethod.DELETE)
+    public AjaxResult delGrouthRule(Long[] id){
+        return toAjax(customerGradeSettingService.deleteGrouthRuleByIds(id));
     }
 
 

+ 1 - 1
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerGradeSettingMapper.java

@@ -35,7 +35,7 @@ public interface CustomerGradeSettingMapper
      * 根据ID删除成长规则
      * @return
      */
-    public int deleteGrouthRuleById(long id);
+    public int deleteGrouthRuleById(String id);
 
     /*
      * 批量删除成长规则

+ 1 - 1
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerGradeSettingService.java

@@ -36,7 +36,7 @@ public interface ICustomerGradeSettingService
      * 根据ID删除成长规则
      * @return
      */
-    public int deleteGrouthRuleById(Long id);
+    public int deleteGrouthRuleById(String id);
 
     /*
      * 批量删除成长规则

+ 1 - 1
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerGradeSettingServiceImpl.java

@@ -53,7 +53,7 @@ public class CustomerGradeSettingServiceImpl implements ICustomerGradeSettingSer
      * @return
      */
     @Override
-    public int deleteGrouthRuleById(Long id) {
+    public int deleteGrouthRuleById(String id) {
         return customerGradeSettingMapper.deleteGrouthRuleById(id);
     }
 

+ 1 - 1
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerGradeSettingMapper.xml

@@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <!--删除一条成长规则-->
-    <delete id="deleteGrouthRuleById" parameterType="Long">
+    <delete id="deleteGrouthRuleById" parameterType="String">
         DELETE
         FROM
             customer_grouth_rule

+ 1 - 1
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/PayOrderController.java

@@ -22,7 +22,7 @@ import com.yijia.common.core.page.TableDataInfo;
 
 /**
  * 订单支付Controller
- * 
+ *
  * @author yijia
  * @date 2020-12-10
  */

+ 8 - 2
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/PayOrderMapper.xml

@@ -41,9 +41,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderLiters != null  and orderLiters != ''"> and order_liters = #{orderLiters}</if>
             <if test="payType != null  and payType != ''"> and pay_type = #{payType}</if>
             <if test="payWay != null  and payWay != ''"> and pay_way = #{payWay}</if>
-            <if test="payDate != null "> and pay_date = #{payDate}</if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(created_date,'%y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(created_date,'%y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%y-%m-%d %H:%i:%s')
+            </if>
+<!--            <if test="payDate != null "> and pay_date = #{payDate}</if>-->
             <if test="oilPersonnel != null  and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
-            <if test="createdDate != null "> and created_date = #{createdDate}</if>
+<!--            <if test="createdDate != null "> and created_date = #{createdDate}</if>-->
             <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
         </where>
         ORDER BY created_date DESC

+ 2 - 2
Yijia-SaaS/yijia-ui/src/api/customer/setting.js

@@ -28,8 +28,8 @@ export function editGrouthRule(data) {
 //删除成长规则
 export function delGrouthRule(id) {
   return request({
-    url: '/customer/setting/delGrouthRule' + id,
-    method: 'post',
+    url: '/customer/setting/delGrouthRule?id=' + id,
+    method: 'delete'
   })
 }
 

+ 9 - 6
Yijia-SaaS/yijia-ui/src/views/customer/setting/index.vue

@@ -89,10 +89,10 @@
           <el-input v-model="formGrouthRule.grouthValueName" placeholder="请输入成长规则名称" />
         </el-form-item>
         <el-form-item label="消费值" prop="grouthValueConsume">
-          <el-input v-model="formGrouthRule.grouthValueConsume" placeholder="请输入消费值" />
+          <el-input v-model="formGrouthRule.grouthValueConsume" onkeyup="value=value.replace(/[^\d]/g,'')" placeholder="请输入消费值" />
         </el-form-item>
         <el-form-item label="成长值" prop="grouthValue">
-          <el-input v-model="formGrouthRule.grouthValue" placeholder="请输入成长值" />
+          <el-input v-model="formGrouthRule.grouthValue" onkeyup="value=value.replace(/[^\d]/g,'')" placeholder="请输入成长值" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -141,7 +141,7 @@
 <!--    </el-form>-->
 
     <!--动态等级-->
-    <p style="margin-left: 5px; margin-top: 25px;"><span class="textlineHeader">动态等级</span>
+    <p style="margin-left: 5px; margin-top: 25px; margin-bottom: 5px;"><span class="textlineHeader">动态等级</span>
       <el-button class="settingButton" icon="el-icon-plus" size="mini" @click="handleAddDT" v-hasPermi="['customer:setting:add']" >添加动态等级</el-button>
     </p>
     <div class="cutLine"></div>
@@ -376,7 +376,7 @@ export default {
     //查询成长规则列表
     getRuleList() {
       this.loading = true;
-      getGrouthRuleList(this.selectParams).then(response => {
+      getGrouthRuleList().then(response => {
         this.grouthRuleList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -385,9 +385,11 @@ export default {
 
     //打开新增成长规则窗口
     handleAddGrouthRules(){
-      this.reset();
+      //this.reset();
+      this.formGrouthRule = {};
       this.openGrouthRule = true;
       this.title = "添加成长规则";
+
     },
     //打开修改成长规则窗口
     grouthRuleUpdate(row){
@@ -434,7 +436,7 @@ export default {
     grouthRuleDelete(row){
       const ids = row.id || this.ids
         if(row.id !=null || this.ids != null){
-          this.$confirm('是否确认删除该成长规则的数据项?', "警告",{
+          this.$confirm('是否删除该成长规则的数据项?', "警告",{
             confirmButtonText: "确定",
             cancelButtonText: "取消",
             type: "warning"
@@ -442,6 +444,7 @@ export default {
             delGrouthRule(ids);
           }).then(() =>{
               this.msgSuccess("删除成功");
+              this.getRuleList();
           })
         }
     },

+ 21 - 17
Yijia-SaaS/yijia-ui/src/views/station/order/index.vue

@@ -103,14 +103,6 @@
           ></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="支付时间" prop="payDate">
-        <el-date-picker clearable size="small" style="width: 200px"
-                        v-model="queryParams.payDate"
-                        type="date"
-                        value-format="yyyy-MM-dd"
-                        placeholder="选择支付时间">
-        </el-date-picker>
-      </el-form-item>
       <el-form-item label="加油员" prop="oilPersonnel">
         <el-input
           v-model="queryParams.oilPersonnel"
@@ -120,19 +112,21 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="创建时间" prop="createdDate">
-        <el-date-picker clearable size="small" style="width: 200px"
-                        v-model="queryParams.createdDate"
-                        type="date"
-                        value-format="yyyy-MM-dd"
-                        placeholder="选择创建时间">
-        </el-date-picker>
-      </el-form-item>
       <el-form-item label="订单类型" prop="orderType">
         <el-select v-model="queryParams.orderType" placeholder="请选择订单类型" clearable size="small">
           <el-option label="请选择字典生成" value="" />
         </el-select>
       </el-form-item>
+
+      <el-form-item label="创建时间" prop="createdDate">
+        <el-date-picker style="width: 350px"
+          v-model="dateRangeCreatedDate" size="mini" value-format="yyyy-MM-dd HH:mm:ss"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -338,6 +332,9 @@
     name: "Order",
     data() {
       return {
+
+        //创建订单时间间隔
+        dateRangeCreatedDate:[],
         // 遮罩层
         loading: true,
         // 选中数组
@@ -375,7 +372,13 @@
           orderLiters: null,
           payType: null,
           payWay: null,
+          // pay:[],
+          // cre:[],
           payDate: null,
+          payMaxDate: null,
+          payMinDate: null,
+          createdMaxDate: null,
+          createdMinDate: null,
           oilPersonnel: null,
           createdDate: null,
           orderType: null
@@ -433,7 +436,7 @@
       /** 查询订单支付列表 */
       getList() {
         this.loading = true;
-        listOrder(this.queryParams).then(response => {
+        listOrder(this.addDateRange(this.queryParams, this.dateRangeCreatedDate)).then(response => {
           this.orderList = response.rows;
           this.total = response.total;
           this.loading = false;
@@ -473,6 +476,7 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.dateRangeCreatedDate =[];
         this.resetForm("queryForm");
         this.handleQuery();
       },