Explorar el Código

修改班结打印小票,客户信息查询订单明细

MS-QJVSRANLTYEO\Administrator hace 4 años
padre
commit
857edda257

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

@@ -67,6 +67,7 @@
       <!-- <el-table-column label="客户表id" align="center" prop="id" v-if="false" /> -->
       <el-table-column label="会员id" align="center" prop="memberId" />
       <el-table-column label="" align="center" prop="unionId" v-if="false"/>
+      <el-table-column label="2223232" align="center" prop="minaUserId" v-if="false"/>
       <el-table-column label="客户姓名" align="center" prop="customerName" />
       <!-- <el-table-column label="推荐人" align="center" prop="commendMan" /> -->
       <el-table-column label="会员等级" align="center" prop="grade" />
@@ -255,7 +256,8 @@ export default {
         pageSize: 10,
         oilName: null,
         stationId: null,
-        customerName: null
+        customerName: null,
+        consumerId: null
       },
       // 表单参数
       form: {},
@@ -380,22 +382,17 @@ export default {
     },
     lookinfo(row){
       this.row =row;
-      row.page= this.queryOrder.pageNum;
-      row.limit= this.queryOrder.pageSize;
-      this.listPage(row);
+      this.listPage();
     },
-    listPage(row){
+    listPage(){
       this.queryOrder.stationId=this.$store.selectDeptId;
-      this.queryOrder.consumer=row.customerName;
-      this.queryOrder.pageNum=row.page;
-      this.queryOrder.pageSize =row.limit;
+      this.queryOrder.consumerId=this.row.minaUserId;
       getOrderInfo(this.queryOrder).then(response => {
         this.orderList = response.rows;
         this.openOrderInfo = true;
         this.totalOrder = response.total;
         this.titleOrderInfo = "查看客户订单信息";
         this.loading = false;
-
       });
     },
     /** 提交按钮 */

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

@@ -16,8 +16,7 @@
         <!-- <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button> -->
       </el-form-item>
     </el-form>
-    <el-table v-loading="loading" :data="pointsList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
+    <el-table v-loading="loading" :data="pointsList" >
       <el-table-column label="id" align="center" prop="id"  v-if ="false" />
       <el-table-column label="微信用户unionID" align="center" prop="unionId" v-if="false"/>
       <el-table-column label="公众号的openID" align="center" prop="blogOpenid" v-if="false"/>
@@ -57,7 +56,7 @@
      <!-- 添加或修改客户积分记录对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="750px" append-to-body>
       <div class="app-container">
-        <el-table v-loading="loadingInfo" :data="recordList" @selection-change="handleSelectionChange">
+        <el-table v-loading="loadingInfo" :data="recordList" >
           <el-table-column label="主键自增" align="center" prop="id"  v-if ="false"/>
           <el-table-column label="微信用户唯一标识" align="center" prop="unionId"  v-if ="false"/>
           <el-table-column label="客户名称" align="center" prop="customerName" />
@@ -218,13 +217,6 @@ export default {
         this.title = "查看客户积分记录";
     },
 
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;

+ 94 - 52
Yijia-SaaS/yijia-ui/src/views/market/plan/index.vue

@@ -21,7 +21,7 @@
         </el-select>
         <el-button  size="mini" @click="save"  type="primary">确定执行该优惠方案</el-button>
       </el-form-item>
-    </el-form>  
+    </el-form>
     <el-form :model="zjParams" ref="zjParams" :inline="true" v-show="showZJ" label-width="68px">
       <div>
         <span  style="color:#ff9955;font-size:25px;" >|</span><span style="font-size:25px;">直降方案</span>
@@ -64,8 +64,8 @@
         <el-form-item label="方案名称" prop="grade">
           <el-input v-model="zjform.grade" placeholder="请输入方案名称" />
         </el-form-item>
-        <el-form-item label="油品名称" prop="oilName">
-          <el-select v-model="zjform.oilName" placeholder="油品名称" clearable size="small">
+        <el-form-item label="油品名称" prop="oilName" >
+          <el-select v-model="zjform.oilName" placeholder="油品名称" clearable size="small" :disabled="zjStatus">
             <el-option
               v-for="dict in oilNameOptionsZJ"
               :key="dict.oilName"
@@ -170,7 +170,7 @@
           <el-input v-model="form.grade" placeholder="请输入等级名称" />
         </el-form-item>
         <el-form-item label="油品名称" prop="oilName">
-          <el-select v-model="form.oilName" placeholder="油品名称" clearable size="small">
+          <el-select v-model="form.oilName" placeholder="油品名称" clearable size="small" :disabled="mjStatus" >
             <el-option
               v-for="dict in oilNameOptions"
               :key="dict.oilName"
@@ -231,7 +231,7 @@
         </template>
       </el-table-column>
       <el-table-column label="优惠条件金额" v-if="false" align="center" prop="discountAmt" />
-      <el-table-column label="优惠金额" v-if="false"align="center" prop="gasoilDiscountAmt" />
+      <el-table-column label="优惠金额" v-if="false" align="center" prop="gasoilDiscountAmt" />
       <el-table-column label="等级优惠是否叠加" align="center" prop="vipDiscountyPlus" :formatter="vipDiscountyPlusFotmat" />
       <el-table-column label="可否叠加劵" align="center" prop="couponPlus" :formatter="couponPlusFotmat" />
       <el-table-column label="优惠方案类型" v-if="false" align="center" prop="discountPlanType" />
@@ -261,7 +261,7 @@
           <el-input v-model="dtform.grade" placeholder="请输入等级名称" />
         </el-form-item>
         <el-form-item label="油品名称" prop="oilName">
-          <el-select v-model="dtform.oilName" placeholder="油品名称" clearable size="small">
+          <el-select v-model="dtform.oilName" placeholder="油品名称" clearable size="small" :disabled="ljStatus">
             <el-option
               v-for="dict in oilNameOptionsDT"
               :key="dict.oilName"
@@ -350,6 +350,9 @@
         fangan:"",
         // 是否显示弹出层
         open: false,
+        zjStatus:false,
+        mjStatus:false,
+        ljStatus:false,
         yuan: true,
         laters: false,
         opendt: false,
@@ -427,6 +430,9 @@
         zjrules: {
           discountTerm: [
             { required: true, message: "选择优惠执行规则", trigger: "blur" }
+          ],
+          oilName:[
+            { required: true, message: "请选择油品名称", trigger: "blur" }
           ]
         },
         queryInfo:{
@@ -528,6 +534,7 @@
         });
       },
       discountSettingChang(e){
+        console.log("打印是选择的优惠方案:",e);
         if(e=="1"){
           this.showZJ=false;
           this.showMJ=false;
@@ -704,13 +711,14 @@
         this.resetForm("zjform");
       },
 
-      /** 新增按钮操作 */
+      /** 新增满减操作 */
       handleAdd() {
         this.reset();
         this.deptId=this.$store.selectDeptId;
         if(this.deptId==null || this.deptId==""){
           this.deptId =this.$store.state.user.deptId;
         }
+        this.mjStatus=false;
         getDept(this.deptId).then(response => {
           this.deptInfo = response.data;
           if(this.deptInfo.jiBie==2){
@@ -725,21 +733,23 @@
           }else{
               this.msgSuccess("请选择油站");
           }
-        }); 
+        });
       },
-      /** 修改按钮操作 */
+      /** 修改满减操作 */
       handleUpdate(row) {
         this.reset();
         const id = row.id || this.ids
+         this.mjStatus=true;
         getPlan(id).then(response => {
           this.form = response.data;
           this.open = true;
           this.title = "修改满减优惠";
         });
       },
-      /** 新增按钮操作 */
+      /** 新增立减操作 */
       handleAddDT() {
         this.resetDT();
+         this.ljStatus=false;
         this.deptId=this.$store.selectDeptId;
         if(this.deptId==null || this.deptId==""){
           this.deptId =this.$store.state.user.deptId;
@@ -758,11 +768,12 @@
           }else{
               this.msgSuccess("请选择油站");
           }
-        }); 
+        });
       },
-      /** 修改按钮操作 */
+      /** 修改立减操作 */
       handleUpdateDT(row) {
         this.resetDT();
+        this.ljStatus=true;
         const id = row.id || this.ids
         getPlan(id).then(response => {
           this.dtform = response.data;
@@ -770,9 +781,10 @@
           this.title = "修改立减优惠";
         });
       },
-      /** 新增按钮操作 */
+      /** 新增直降操作 */
       handleAddZJ() {
         this.resetZJ();
+        this.zjStatus=false;
         this.deptId=this.$store.selectDeptId;
         if(this.deptId==null || this.deptId==""){
           this.deptId =this.$store.state.user.deptId;
@@ -792,9 +804,9 @@
           }else{
               this.msgSuccess("请选择油站");
           }
-        }); 
+        });
       },
-      /** 修改按钮操作 */
+      /** 修改直降操作 */
       handleUpdateZJ(row) {
         this.resetZJ();
         const id = row.id || this.ids
@@ -802,6 +814,7 @@
           this.zjform = response.data;
           this.openzj = true;
           this.titlezj = "修改直降优惠";
+          this.zjStatus=true;
           if(this.zjform.discountTerm=="2"){
             this.yuan=true;
             this.laters=false;
@@ -811,11 +824,22 @@
           }
         });
       },
-      /** 提交按钮 */
+      /** 提交满减方案 */
       submitForm() {
         this.form.discountPlanType="1";
         this.$refs["form"].validate(valid => {
           if (valid) {
+            let flag = true;
+            //判断满减方案是否有该油品的满减方案
+            let planList =this.planList;
+            if(planList.length>0){
+              for(let i=0;i<planList.length;i++){
+                if(this.form.oilName ===planList[i].oilName){
+                    flag = false;
+                    break;
+                }
+              }
+            }
             if (this.form.id != null) {
               updatePlan(this.form).then(response => {
                 this.msgSuccess("修改成功");
@@ -823,21 +847,36 @@
                 this.getList();
               });
             } else {
-              addPlan(this.form).then(response => {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              });
+              if(flag){
+                addPlan(this.form).then(response => {
+                  this.msgSuccess("新增成功");
+                  this.open = false;
+                  this.getList();
+                });
+              }else{
+                this.msgSuccess("该油品已有满减方案,请重新创建");
+              }
             }
           }
         });
 
       },
-      /** 提交按钮 */
+      /** 提交立减方案*/
       submitFormDT() {
         this.dtform.discountPlanType="2";
         this.$refs["dtform"].validate(valid => {
           if (valid) {
+            let flag = true;
+             //判断立减方案是否有该油品的立减方案
+            let dtplanList =this.DTplanList;
+            if(dtplanList.length>0){
+              for(let i=0;i<dtplanList.length;i++){
+                if(this.dtform.oilName ===dtplanList[i].oilName){
+                    flag = false;
+                    break;
+                }
+              }
+            }
             if (this.dtform.id != null) {
               updatePlan(this.dtform).then(response => {
                 this.msgSuccess("修改成功");
@@ -845,20 +884,35 @@
                 this.getList2();
               });
             } else {
-              addPlan(this.dtform).then(response => {
-                this.msgSuccess("新增成功");
-                this.opendt= false;
-                this.getList2();
-              });
+              if(flag){
+                addPlan(this.dtform).then(response => {
+                  this.msgSuccess("新增成功");
+                  this.opendt= false;
+                  this.getList2();
+                });
+              }else{
+                this.msgSuccess("该油品已有立减方案,请重新创建");
+              }
             }
           }
         });
       },
-        /** 提交按钮 */
+        /** 提交直降方案 */
       submitFormZJ() {
         this.zjform.discountPlanType="3";
         this.$refs["zjform"].validate(valid => {
           if (valid) {
+            let flag = true;
+            //判断直降方案是否有该油品的直降方案
+            let zjlist =this.ZJplanList;
+            if(zjlist.length>0){
+              for(let i=0;i<zjlist.length;i++){
+                if(this.zjform.oilName ===zjlist[i].oilName){
+                    flag = false;
+                    break;
+                }
+              }
+            }
             if (this.zjform.id != null) {
               updatePlan(this.zjform).then(response => {
                 this.msgSuccess("修改成功");
@@ -866,16 +920,20 @@
                 this.getList3();
               });
             } else {
-              addPlan(this.zjform).then(response => {
-                this.msgSuccess("新增成功");
-                this.openzj= false;
-                this.getList3();
-              });
+              if(flag){
+                addPlan(this.zjform).then(response => {
+                  this.msgSuccess("新增成功");
+                  this.openzj= false;
+                  this.getList3();
+                });
+              }else{
+                this.msgSuccess("该油品已有直降方案,请重新创建");
+              }
             }
           }
         });
       },
-      /** 删除按钮操作 */
+      /** 删除满减操作 */
       handleDelete(row) {
         const ids = row.id || this.ids;
         this.$confirm('是否确认删除满减优惠方案?', "警告", {
@@ -889,7 +947,7 @@
           this.msgSuccess("删除成功");
         })
       },
-      /** 删除按钮操作 */
+      /** 删除立减操作 */
       handleDeleteDT(row) {
         const ids = row.id || this.ids;
         this.$confirm('是否确认删除立减优惠方案?', "警告", {
@@ -903,7 +961,7 @@
           this.msgSuccess("删除成功");
         })
       },
-      /** 删除按钮操作 */
+      /** 删除直降操作 */
       handleDeleteZJ(row) {
         const ids = row.id || this.ids;
         this.$confirm('是否确认删除直降优惠方案?', "警告", {
@@ -917,22 +975,6 @@
           this.msgSuccess("删除成功");
         })
       },
-      /** 导出按钮操作 */
-      handleExport() {
-        const queryParams = this.queryParams;
-         if(queryParams.stationId==null || queryParams.stationId==""){
-          queryParams.stationId =this.$store.state.user.deptId;
-        }
-        this.$confirm('是否确认导出所有优惠设置数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportPlan(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-        })
-      },
       discountTermFormat(row, column) {
         if (row.discountTerm === "1") {
           return '按加油升数优惠'

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

@@ -63,7 +63,7 @@
     <el-dialog :title="titleAdjust" :visible.sync="open1" :rules="rules" width="500px" append-to-body>
       <el-form ref="form1" :model="form1"  label-width="80px">
         <el-form-item label="油品名称" prop="oilName" >
-          <el-select :disabled="editInfo" v-model="form1.oilName" placeholder="油品名称" clearable size="small">
+          <el-select :disabled="true" v-model="form1.oilName" placeholder="油品名称" clearable size="small" >
             <el-option
               v-for="dict in oilNameOptions"
               :key="dict.dictLabel"
@@ -92,7 +92,7 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item label="油站名称"  prop="stationId"  >
-          <el-select :disabled="editInfo"
+          <el-select :disabled="true"
             v-model="form1.stationId"
             placeholder="请选择油站"
             clearable

+ 25 - 4
Yijia-SaaS/yijia-ui/src/views/station/summary/index.vue

@@ -12,7 +12,9 @@
       </el-form-item>
       <el-form-item label="班结时间" prop="endDate">
         <el-date-picker style="width: 350px"
-                        v-model="dateRangeCreatedDate" size="mini" value-format="yyyy-MM-dd HH:mm:ss"
+                        v-model="dateRangeCreatedDate" 
+                        size="mini" 
+                        value-format="yyyy-MM-dd HH:mm:ss"
                         type="datetimerange"
                         range-separator="至"
                         start-placeholder="开始日期"
@@ -21,7 +23,7 @@
       </el-form-item>
       <el-form-item label="班结人" prop="classesMan">
         <el-input
-          v-model="queryParams.classesMan"
+          v-model="queryParams.likeClassesMan"
           placeholder="请输入班结人"
           clearable
           size="small"
@@ -166,7 +168,8 @@ export default {
         zfbAmt: null,
         dzkAmt: null,
         classesMan: null,
-        likeClassesNo:null
+        likeClassesNo:null,
+        likeClassesMan:null
       },
       // 查询参数
       queryParam: {
@@ -241,7 +244,6 @@ export default {
       }
       listSummary(this.addDateRange(this.queryParams, this.dateRangeCreatedDate)).then(response => {
         this.summaryList = response.rows;
-        console.log("summaryList",this.summaryList);
         this.total = response.total;
         this.loading = false;
       });
@@ -279,6 +281,25 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        classesNo: null,
+        startDate: null,
+        endDate: null,
+        stationId: null,
+        stationName: null,
+        orderNum: null,
+        printNum: null,
+        saleLiters: null,
+        saleAmt: null,
+        wxAmt: null,
+        zfbAmt: null,
+        dzkAmt: null,
+        classesMan: null,
+        likeClassesNo:null,
+        likeClassesMan:null
+      }
       this.resetForm("queryForm");
       this.dateRangeCreatedDate =[];
       this.handleQuery();