Forráskód Böngészése

修改油站会员积分,班结查看,积分明细

MS-QJVSRANLTYEO\Administrator 4 éve
szülő
commit
068ca6e076

+ 10 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerManage.java

@@ -132,6 +132,16 @@ public class CustomerManage extends BaseEntity
     @Excel(name = "微信UnionID")
     private String unionId;
 
+    private Date payDate;
+
+    public Date getPayDate() {
+        return payDate;
+    }
+
+    public void setPayDate(Date payDate) {
+        this.payDate = payDate;
+    }
+
     /**
      * 根据用户所属组织,平台,集团,油站查询条件
      */

+ 47 - 10
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerManageMapper.xml

@@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="liters"    column="liters"    />
         <result property="amt"    column="amt"    />
         <result property="unionId"    column="union_id"    />
+        <result property="payDate"    column="pay_date"    />
     </resultMap>
 
     <sql id="selectCustomerManageVo">
@@ -191,25 +192,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+<!--    <select id="selectCustomerManage" parameterType="CustomerManage" resultMap="CustomerManageResult">-->
+<!--        SELECT m.member_id,m.customer_name,m.phone_number,m.car_number,GROUP_CONCAT(DISTINCT(m.oil_name)) oil_name,GROUP_CONCAT(DISTINCT(m.grade)) as grade,m.union_id,p.points as integral,sum(CASE c.card_oils_type  WHEN '1' THEN  c.amt ELSE 0 END ) qy_amt,sum(CASE c.card_oils_type  WHEN '2' THEN  c.amt ELSE 0 END ) cy_amt-->
+<!--        from customer_manage m-->
+<!--        left join customer_points p on m.union_id = p.union_id and m.station_id = p.station_id-->
+<!--        left join customer_electronic_card c on c.union_id =m.union_id and c.station_id = m.station_id-->
+<!--        <where>-->
+<!--            <if test="stationIdList != null ">-->
+<!--                and m.station_id in-->
+<!--                <foreach item="item" index="index" collection="stationIdList"-->
+<!--                         open="(" separator="," close=")">-->
+<!--                    #{item}-->
+<!--                </foreach>-->
+<!--            </if>-->
+<!--            <if test="carNumber != null  and carNumber != ''"> and car_number = #{carNumber}</if>-->
+<!--            <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>-->
+<!--            <if test="memberGrade != null  and memberGrade != ''"> and member_grade = #{memberGrade}</if>-->
+<!--            <if test="phoneNumber != null  and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>-->
+<!--            <if test="customerName != null  and customerName != ''"> and m.customer_name like concat('%', #{customerName}, '%')</if>-->
+<!--        </where>-->
+<!--        GROUP BY m.union_id,m.member_id,m.customer_name,m.phone_number, m.car_number,p.points,c.union_id,c.station_id-->
+<!--    </select>-->
     <select id="selectCustomerManage" parameterType="CustomerManage" resultMap="CustomerManageResult">
+        SELECT sy.*,px.pay_date from (
         SELECT m.member_id,m.customer_name,m.phone_number,m.car_number,GROUP_CONCAT(DISTINCT(m.oil_name)) oil_name,GROUP_CONCAT(DISTINCT(m.grade)) as grade,m.union_id,p.points as integral,sum(CASE c.card_oils_type  WHEN '1' THEN  c.amt ELSE 0 END ) qy_amt,sum(CASE c.card_oils_type  WHEN '2' THEN  c.amt ELSE 0 END ) cy_amt
-        from customer_manage m
-        left join customer_points p on m.union_id = p.union_id and m.station_id = p.station_id
-        left join customer_electronic_card c on c.union_id =m.union_id and c.station_id = m.station_id
+            from customer_manage m
+            left join customer_points p on m.union_id = p.union_id and m.station_id = p.station_id
+            left join customer_electronic_card c on c.union_id =m.union_id and c.station_id = m.station_id
+            <where>
+                <if test="stationIdList != null ">
+                    and m.station_id in
+                    <foreach item="item" index="index" collection="stationIdList"
+                             open="(" separator="," close=")">
+                        #{item}
+                    </foreach>
+                </if>
+                <if test="carNumber != null  and carNumber != ''"> and car_number = #{carNumber}</if>
+                <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
+                <if test="memberGrade != null  and memberGrade != ''"> and member_grade = #{memberGrade}</if>
+                <if test="phoneNumber != null  and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
+                <if test="customerName != null  and customerName != ''"> and m.customer_name like concat('%', #{customerName}, '%')</if>
+            </where>
+            GROUP BY m.union_id,m.member_id,m.customer_name,m.phone_number, m.car_number,p.points,c.station_id
+        ) sy
+        LEFT JOIN (SELECT max(pay_date) pay_date ,po.consumer
+        from pay_order po
         <where>
             <if test="stationIdList != null ">
-                and m.station_id in
+                and po.station_id in
                 <foreach item="item" index="index" collection="stationIdList"
                          open="(" separator="," close=")">
                     #{item}
                 </foreach>
             </if>
-            <if test="carNumber != null  and carNumber != ''"> and car_number = #{carNumber}</if>
-            <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
-            <if test="memberGrade != null  and memberGrade != ''"> and member_grade = #{memberGrade}</if>
-            <if test="phoneNumber != null  and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
-            <if test="customerName != null  and customerName != ''"> and m.customer_name like concat('%', #{customerName}, '%')</if>
         </where>
-        GROUP BY m.union_id,m.member_id,m.customer_name,m.phone_number, m.car_number,p.points,c.union_id,c.station_id
+        GROUP BY  po.consumer) px on sy.customer_name =  px.consumer
+        order by px.pay_date desc
     </select>
 </mapper>

+ 2 - 2
Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/domain/CustomerPoints.java

@@ -53,8 +53,8 @@ public class CustomerPoints extends BaseEntity
     private Long invalidPoints;
 
     /** 最新消费积分时间 */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "最新消费积分时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "最新消费积分时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date recentConsumptionDate;
 
     /** 油站ID */

+ 1 - 1
Yijia-SaaS/yijia-integral/src/main/resources/mapper/integral/CustomerPointsMapper.xml

@@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 </foreach>
             </if>
         </where>
-        order by  id desc
+        order by  recent_consumption_date desc
     </select>
     
     <select id="selectCustomerPointsById" parameterType="Long" resultMap="CustomerPointsResult">

+ 33 - 6
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationClassStructureMapper.xml

@@ -165,15 +165,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         GROUP BY class_structure_no,class_start_date,station_id,station_name,class_structure_date,class_structure_man
     </select>
     <!--按员工/支付方式汇总数据-->
+<!--    SELECT oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,count(wx_amt) wx_num,count(zfb_amt) zfb_num,count(xj_amt) xj_num,sum(discount_amt) discount_amt,SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,SUM(xj_amt) xj_amt,sum(member_amt) member_amt-->
+<!--    from  station_class_structure-->
+<!--    <where>-->
+<!--        <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>-->
+<!--        <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>-->
+<!--        <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>-->
+<!--    </where>-->
+<!--    GROUP BY oil_personnel-->
     <select id="listPersonnelPayStructure" parameterType="StationClassStructure" resultMap="StationClassStructureResult">
-        SELECT oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,count(wx_amt) wx_num,count(zfb_amt) zfb_num,count(xj_amt) xj_num,sum(discount_amt) discount_amt,SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,SUM(xj_amt) xj_amt,sum(member_amt) member_amt
-        from  station_class_structure
+        SELECT oil_personnel,GROUP_CONCAT(DISTINCT oil_gun) oil_gun,
+        sum(discount_amt) discount_amt,
+        SUM(discount_coupon_amt) discount_coupon_amt,SUM(wx_amt) wx_amt,SUM(zfb_amt) zfb_amt,
+        SUM(xj_amt) xj_amt,sum(member_amt) member_amt,
+        (SELECT COUNT(b.order_no) from station_class_structure b
+            <where>
+                 and b.pay_type="xj"
+                <if test="classStructureNo != null and classStructureNo != ''"> and b.class_structure_no = #{classStructureNo}</if>
+            </where>
+         ) xj_num,
+        (SELECT COUNT(c.order_no) from station_class_structure c
+            <where>
+                and c.pay_type="zfb"
+                <if test="classStructureNo != null and classStructureNo != ''"> and c.class_structure_no = #{classStructureNo}</if>
+            </where>
+        ) zfb_num,
+        (SELECT COUNT(d.order_no) from station_class_structure d
+            <where>
+                and d.pay_type="wx"
+                <if test="classStructureNo != null and classStructureNo != ''"> and d.class_structure_no = #{classStructureNo}</if>
+            </where>
+        ) wx_num
+        from  station_class_structure a
         <where>
-            <if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
-            <if test="classStructureNo != null and classStructureNo != ''"> and class_structure_no = #{classStructureNo}</if>
-            <if test="orderType != null  and orderType != ''"> and order_type = #{orderType}</if>
+            <if test="classStructureNo != null and classStructureNo != ''"> and a.class_structure_no = #{classStructureNo}</if>
         </where>
-        GROUP BY oil_personnel
+        GROUP BY a.oil_personnel
     </select>
 
     <select id="listClass" parameterType="StationClassStructure" resultMap="StationClassStructureResult">

+ 91 - 11
Yijia-SaaS/yijia-ui/src/views/customer/cardSetting/index.vue

@@ -343,7 +343,11 @@ export default {
               this.workDaytrue=false;
               this.moonDaytrue=false;
               this.datetrue=true;
-              this.pickerTime =this.form.discountTime.split(",");
+              if(this.form.discountTime!=""){
+                  this.pickerTime =this.form.discountTime.split(",");
+              }else{
+                this.pickerTime =null;
+              }
             }
           }
         });
@@ -449,13 +453,50 @@ export default {
           if (this.form.id != null) {
             let datepicker = this.form.discountTimeType;
             if(datepicker=="1"){
-              this.form.discountTime=this.collectClickWorkDay.toString(); 
+              if(this.collectClickWorkDay!=null&&this.collectClickWorkDay.length>0){
+                let discountTime=null;
+                for(let i =0;i<this.collectClickWorkDay.length;i++){
+                  if(!isNaN(this.collectClickWorkDay[i]) && this.collectClickWorkDay[i]!="NaN"){
+                    if( discountTime!=null){
+                      discountTime =discountTime+","+this.collectClickWorkDay[i];
+                    }else{
+                      discountTime =this.collectClickWorkDay[i];
+                    }
+                  }else{
+                    discountTime =discountTime;
+                  }
+                }
+                this.form.discountTime=discountTime; 
+                discountTime=null;
+              } else{
+                  this.form.discountTime=""; 
+              }
             }else if(datepicker=="2"){
-              this.form.discountTime=this.collectClickCalendar.toString();
+              if(this.collectClickCalendar!=null&&this.collectClickCalendar.length>0){
+                let discountTime=null;
+                for(let i =0;i<this.collectClickCalendar.length;i++){
+                  if(!isNaN(this.collectClickCalendar[i]) && this.collectClickCalendar[i]!="NaN"){
+                    if( discountTime!=null){
+                      discountTime =discountTime+","+this.collectClickCalendar[i];
+                    }else{
+                      discountTime =this.collectClickCalendar[i];
+                    }
+                  }else{
+                    discountTime =discountTime;
+                  }
+                }
+                this.form.discountTime=discountTime; 
+                discountTime=null;
+              } else{
+                  this.form.discountTime=""; 
+              }
             }else{
-              this.form.discountTime = this.pickerTime.toString();
-            }
-
+              if(this.pickerTime!=null){
+                  this.form.discountTime = this.pickerTime.toString();
+              }else{
+                this.form.discountTime = "";
+              }
+            }    
             updateSetting(this.form).then(response => {
               this.msgSuccess("修改成功");
               this.jine=false;
@@ -463,13 +504,51 @@ export default {
             });
           } else {
             if(this.num==0){
-              let datepicker = this.form.datePicker;
               if(datepicker=="1"){
-                this.form.discountTime=this.collectClickWorkDay.toString();
+                if(this.collectClickWorkDay!=null&&this.collectClickWorkDay.length>0){
+                  let discountTime=null;
+                  for(let i =0;i<this.collectClickWorkDay.length;i++){
+                    if(!isNaN(this.collectClickWorkDay[i]) && this.collectClickWorkDay[i]!="NaN"){
+                      if( discountTime!=null){
+                        discountTime =discountTime+","+this.collectClickWorkDay[i];
+                      }else{
+                        discountTime =this.collectClickWorkDay[i];
+                      }
+                    }else{
+                      discountTime =discountTime;
+                    }
+                  }
+                  this.form.discountTime=discountTime; 
+                  discountTime=null;
+                } else{
+                    this.form.discountTime=""; 
+                }
               }else if(datepicker=="2"){
-                this.form.discountTime=this.collectClickCalendar.toString();
+                  // this.form.discountTime=this.collectClickCalendar.toString();
+                  if(this.collectClickCalendar!=null&&this.collectClickCalendar.length>0){
+                    let discountTime=null;
+                    for(let i =0;i<this.collectClickCalendar.length;i++){
+                      if(!isNaN(this.collectClickCalendar[i]) && this.collectClickCalendar[i]!="NaN"){
+                        if( discountTime!=null){
+                          discountTime =discountTime+","+this.collectClickCalendar[i];
+                        }else{
+                          discountTime =this.collectClickCalendar[i];
+                        }
+                      }else{
+                        discountTime =discountTime;
+                      }
+                    }
+                    this.form.discountTime=discountTime; 
+                    discountTime=null;
+                  } else{
+                      this.form.discountTime=""; 
+                  }
               }else{
-                this.form.discountTime = this.pickerTime.toString();
+                if(this.pickerTime!=null){
+                   this.form.discountTime = this.pickerTime.toString();
+                }else{
+                  this.form.discountTime = "";
+                }
               }
               addSetting(this.form).then(response => {
                 this.msgSuccess("新增成功");
@@ -532,7 +611,8 @@ export default {
         }
       }
       // 删除数组元素
-      this.collectClickWorkDay.remove(item)
+      this.collectClickWorkDay.remove(item);
+      console.log("this.collectClickWorkDay111",this.collectClickWorkDay);
     },
     clickWorkDayCalendar(item, index) {
       if (this.collectClickWorkDay.indexOf(index) === -1) {

+ 4 - 4
Yijia-SaaS/yijia-ui/src/views/customer/report/customerReport.vue

@@ -1,7 +1,7 @@
 <template>
   <el-scrollbar style="height:100%">
     <div>
-      <div>
+      <div style="width:99%;">
         <span style="color:#ff9955;font-size:25px;">|</span>
         <span style="font-size:20px;">数据概览</span>
         <el-row :gutter="10" class="panel-group">
@@ -19,10 +19,10 @@
           </el-col>
         </el-row>
       </div>
-      <div style="width:100%; height: 181px;">
+      <div style="width:99%; height: 181px;">
         <span style="color:#ff9955;font-size:25px;">|</span>
         <span style="font-size:20px;">详情:</span>
-        <el-table v-loading="loading" :data="dayReportList">
+        <el-table v-loading="loading"  :data="dayReportList">
           <el-table-column label="日期" align="center" prop="createTime">
               <template slot-scope="scope">
               <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
@@ -32,7 +32,7 @@
           <el-table-column label="消费金额" align="center" prop="xfamt"/>
           <el-table-column label="新增电子会员" align="center" prop="cardnum" />
         </el-table>
-        <div  style="float:right">
+        <div  style="float:right;">
           <el-pagination
             style="padding-top: 15px;"
             @size-change="findSizeChange"

+ 2 - 4
Yijia-SaaS/yijia-ui/src/views/dataSource/dayReport.vue

@@ -75,8 +75,8 @@
           <el-table-column label="汽油" align="center" prop="qyAmt" />
           <el-table-column label="柴油" align="center" prop="cyAmt" />
           <el-table-column label="订单数" align="center" prop="orderNo" />
-          <el-table-column label="应收" align="center" prop="receivableAmt" />
-          <el-table-column label="到账" align="center" prop ="receivedAmt"/>
+          <el-table-column label="应收(元)" align="center" prop="receivableAmt" />
+          <el-table-column label="实收(元)" align="center" prop ="amt"/>
           <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
             <template slot-scope="scope">
               <el-button
@@ -506,9 +506,7 @@ export default {
       this.dayReportDetail();
     },
     dayReportDetail(){
-      console.log("this.queryParams",this.queryParams);
       selectDayReportDetail(this.queryParams).then(response => {
-        console.log("response",response);
         this.dayReportList = response.rows;
         this.total = response.total;
         this.loading = false;

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

@@ -28,9 +28,9 @@
       <el-table-column label="使用积分累计" align="center" prop="consumptionPoints" />
       <el-table-column label="获得积分累计" align="center" prop="accumulatePoints" />
       <el-table-column label="失效积分累计" align="center" prop="invalidPoints" />
-      <el-table-column label="最近积分消费日期" align="center" prop="recentConsumptionDate" width="180">
+      <el-table-column label="最近积分变化日期" align="center" prop="recentConsumptionDate" width="180">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.recentConsumptionDate, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.recentConsumptionDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
         </template>
       </el-table-column>
       <el-table-column label="油站ID" align="center" prop="stationId" v-if="false"/>

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

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="油品名称" prop="oilName">
+       <!-- <el-form-item label="油品名称" prop="oilName">
          <el-select  v-model="queryParams.oilName" placeholder="油品名称" clearable size="small"  @keyup.enter.native="handleQuery">
             <el-option
               v-for="dict in oilNameOptions"
@@ -10,7 +10,7 @@
               :value="dict.oilName"
             />
           </el-select>
-      </el-form-item> 
+      </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>

+ 91 - 20
Yijia-SaaS/yijia-ui/src/views/integral/ruledetail/index.vue

@@ -378,6 +378,8 @@ name: "ruleDetail",
                 this.datetrue=true;
                 if(this.form.datePickerTime!=null){
                   this.pickerTime= this.form.datePickerTime.split(',');
+                }else{
+                  this.pickerTime=null;
                 }
               }
             }
@@ -404,14 +406,14 @@ name: "ruleDetail",
   methods: {
     async sjfa(itemDetail ){
       for(let j = 0; j < itemDetail.length; j++) {
-          this.queryParams.stationId = this.form.stationId;
-          this.queryParams.oilName = itemDetail[j].oilName;
-          if(itemDetail[j].gread ===""){
-              itemDetail[j].gread = "所有人";
-          }
-          const response = await gradeList(this.queryParams);
-          response.rows.push({grade:"所有人"});
-          this.gradeOptions.push(response.rows);
+        this.queryParams.stationId = this.form.stationId;
+        this.queryParams.oilName = itemDetail[j].oilName;
+        if(itemDetail[j].gread ===""){
+            itemDetail[j].gread = "所有人";
+        }
+        const response = await gradeList(this.queryParams);
+        response.rows.push({grade:"所有人"});
+        this.gradeOptions.push(response.rows);
       }
     },
     //添加行
@@ -518,11 +520,49 @@ name: "ruleDetail",
             }
             let datepicker = this.form.datePicker;
             if(datepicker=="1"){
-              this.form.datePickerTime=this.collectClickWorkDay.toString();
+              if(this.collectClickWorkDay!=null&&this.collectClickWorkDay.length>0){
+                let discountTime=null;
+                for(let i =0;i<this.collectClickWorkDay.length;i++){
+                  if(!isNaN(this.collectClickWorkDay[i]) && this.collectClickWorkDay[i]!="NaN"){
+                    if( discountTime!=null){
+                      discountTime =discountTime+","+this.collectClickWorkDay[i];
+                    }else{
+                      discountTime =this.collectClickWorkDay[i];
+                    }
+                  }else{
+                    discountTime =discountTime;
+                  }
+                }
+                this.form.datePickerTime=discountTime; 
+                discountTime=null;
+              }else{
+                  this.form.datePickerTime=""; 
+              }  
             }else if(datepicker=="2"){
-              this.form.datePickerTime=this.collectClickCalendar.toString();
+              if(this.collectClickCalendar!=null&&this.collectClickCalendar.length>0){
+                let discountTime=null;
+                for(let i =0;i<this.collectClickCalendar.length;i++){
+                  if(!isNaN(this.collectClickCalendar[i]) && this.collectClickCalendar[i]!="NaN"){
+                    if( discountTime!=null){
+                      discountTime =discountTime+","+this.collectClickCalendar[i];
+                    }else{
+                      discountTime =this.collectClickCalendar[i];
+                    }
+                  }else{
+                    discountTime =discountTime;
+                  }
+                }
+                this.form.datePickerTime=discountTime; 
+                discountTime=null;
+              } else{
+                  this.form.datePickerTime=""; 
+              }
             }else{
-              this.form.datePickerTime = this.pickerTime.toString();
+              if(this.pickerTime!=null){
+                  this.form.datePickerTime = this.pickerTime.toString();
+              }else{
+                this.form.datePickerTime = "";
+              }
             }
             let itemsDetail =this.form.itemsDetail;
             let flag= true;
@@ -560,18 +600,49 @@ name: "ruleDetail",
             if(this.num===0){
                 let datepicker = this.form.datePicker;
               if(datepicker=="1"){
-                this.form.datePickerTime=this.collectClickWorkDay.toString();
+                if(this.collectClickWorkDay!=null&&this.collectClickWorkDay.length>0){
+                  let discountTime=null;
+                  for(let i =0;i<this.collectClickWorkDay.length;i++){
+                    if(!isNaN(this.collectClickWorkDay[i]) && this.collectClickWorkDay[i]!="NaN"){
+                      if( discountTime!=null){
+                        discountTime =discountTime+","+this.collectClickWorkDay[i];
+                      }else{
+                        discountTime =this.collectClickWorkDay[i];
+                      }
+                    }else{
+                      discountTime =discountTime;
+                    }
+                  }
+                  this.form.datePickerTime=discountTime; 
+                  discountTime=null;
+                }else{
+                    this.form.datePickerTime=""; 
+                }  
               }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.collectClickCalendar!=null&&this.collectClickCalendar.length>0){
+                  let discountTime=null;
+                  for(let i =0;i<this.collectClickCalendar.length;i++){
+                    if(!isNaN(this.collectClickCalendar[i]) && this.collectClickCalendar[i]!="NaN"){
+                      if( discountTime!=null){
+                        discountTime =discountTime+","+this.collectClickCalendar[i];
+                      }else{
+                        discountTime =this.collectClickCalendar[i];
+                      }
+                    }else{
+                      discountTime =discountTime;
+                    }
+                  }
+                  this.form.datePickerTime=discountTime; 
+                  discountTime=null;
+                } else{
+                    this.form.datePickerTime=""; 
                 }
               }else{
-                this.form.notOilList=[{}];
+                if(this.pickerTime!=null){
+                    this.form.datePickerTime = this.pickerTime.toString();
+                }else{
+                  this.form.datePickerTime = "";
+                }
               }
               let itemsDetail =this.form.itemsDetail;
               let flag= true;

+ 14 - 4
Yijia-SaaS/yijia-ui/src/views/station/gun/index.vue

@@ -63,7 +63,7 @@
           </el-select> 
         </el-form-item>
         <el-form-item label="单价" prop="oilPrice" >
-          <el-input-number v-model="form.oilPrice"  :precision="2" :disabled="true" :step="1" style="width:150px;" ></el-input-number>元
+          <el-input-number v-model="form.oilPrice"  :precision="2" :disabled="flage" :step="1" style="width:150px;" ></el-input-number>元
         </el-form-item>
         <el-form-item label="油枪类型" v-show="false">
           <el-radio-group v-model="form.oilGunType" >
@@ -114,6 +114,7 @@ export default {
       title: "",
       // 是否显示弹出层
       open: false,
+      flage:true,
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -162,6 +163,11 @@ export default {
        const response = await listPrice(queryInfo);
        this.oilNameOptions = response.rows;
     },
+    async queryOilPrice(oilPriceId ){
+       const response = await getPrice(oilPriceId);
+       this.form.oilPrice = response.data.oilPrice;
+    },
+  
     /** 查询油枪管理列表 */
     getList() {
       this.loading = true;
@@ -286,9 +292,11 @@ export default {
     onOilNameChang(e){
       let obj = {};
       if(e!=null &&e !=""){
+        console.log("e",e);
         obj = this.oilNameOptions.find((item)=>{//这里的userList就是上面遍历的数据源
           return item.oilName === e;//筛选出匹配数据
         });
+         console.log("obj",obj);
         if(obj.hasOwnProperty('oilName')){
           if(obj.oilName==="非油品"){
             this.form.oilGunType ="2";
@@ -296,9 +304,11 @@ export default {
             this.form.oilGunType ="1";
           }
           if(obj.hasOwnProperty('oilPriceId')){
-            getPrice(obj.oilPriceId).then(response => {
-              this.form.oilPrice = response.data.oilPrice;
-            });
+            // getPrice(obj.oilPriceId).then(response => {
+            //    console.log("objoilPriceId",response);
+            //   this.form.oilPrice = response.data.oilPrice;
+            // });
+            this.queryOilPrice(obj.oilPriceId);
           }else{
             this.form.oilPrice ="0";
           }

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

@@ -44,7 +44,7 @@
           :on-success="handlepaymentSuccess"
           :auto-upload="true">
           <i class="el-icon-plus"></i>
-          <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,最多上传5张且单张图片不超过1M</div>
+          <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,单张图片不超过1M</div>
         </el-upload>
         <el-dialog :visible.sync="dialogVisible" append-to-body>
           <img width="100%" :src="dialogImageUrl" alt="" />
@@ -225,7 +225,7 @@ export default {
       this.$refs["ruleForm"].validate(valid => {
         if (valid) {
           if (this.ruleForm.payId != null) {
-            updateInfo(this.ruleForm).then(response => {
+            updatePay(this.ruleForm).then(response => {
               this.msgSuccess("修改成功");
               this.look();
             });