Browse Source

班结信息展示

2297027248@qq.com 3 years ago
parent
commit
a992662cd2

+ 1 - 1
src/views/order/Order_Approval.vue

@@ -261,7 +261,7 @@ export default {
         createdDate: null,
         likeConsumer: null,
         orderNo: null,
-        examinStatus: "1", // -1 查询下面的列表: 1申请  2成功 3驳回 4 失败 
+        examinStatus: "-1", // -1 查询下面的列表: 1申请  2成功 3驳回 4 失败 
       },
       // 表单校验
       rules: {},

+ 20 - 14
src/views/overview/Overview_AccountingReport.vue

@@ -81,11 +81,12 @@
       <af-table-column label="实收金额" align="center" prop="amt" />
       <af-table-column label="优惠金额" align="center" prop="discountAmt" />
       <af-table-column label="微信支付金额" align="center" prop="wxAmt" />
+      <af-table-column label="退款金额" align="center" prop="refundAmt" />
       <af-table-column
-        label="支付支付金额"
+        label="支付支付金额"
         align="center"
         prop="zfbAmt"
-        v-if="false"
+        
       />
       <af-table-column
         label="电子卡支付金额"
@@ -229,10 +230,15 @@ export default {
         classesNo: "",
         startDate: null,
         endDate: null,
-        
-        
-        
       },
+      queryParamPayOrder: {
+        pageNum: 1,
+        pageSize: 10,
+        classesNo: "",
+        startDate: null,
+        endDate: null,
+      },
+     
       // 查询参数
       queryParam: {
         orderNo: null,
@@ -363,12 +369,12 @@ export default {
       //this.$router.push({path:'/station/structure',query:{classesNo:row.classesNo,stationId:row.stationId,name:row.classesMan}});
       this.open = true;
       this.title = "查看班结明细";
-      this.queryParams.classesMan = row.classesMan;
-      this.queryParams.classesNo = row.classesNo;
-      this.queryParams.stationId = row.stationId;
-      this.queryParams.startDate=row.startDate;
-      this.queryParams.endDate=row.endDate;
-      listClass(this.queryParams).then((response) => {
+      this.queryParamPayOrder.classesMan = row.classesMan;
+      this.queryParamPayOrder.classesNo = row.classesNo;
+      this.queryParamPayOrder.stationId = row.stationId;
+      this.queryParamPayOrder.startDate=row.startDate;
+      this.queryParamPayOrder.endDate=row.endDate;
+      listClass(this.queryParamPayOrder).then((response) => {
         this.opo = response.data;
         this.getStructureList();
         this.getStructureList2();
@@ -383,17 +389,17 @@ export default {
     },
     /** 查询班结管理列表 */
     getStructureList() {
-      listPersonnelStructure(this.queryParams).then((response) => {
+      listPersonnelStructure(this.queryParamPayOrder).then((response) => {
         this.structureList = response.rows;
       });
     },
     getStructureList2() {
-      listOilStructure(this.queryParams).then((response) => {
+      listOilStructure(this.queryParamPayOrder).then((response) => {
         this.structureList1 = response.rows;
       });
     },
     getStructureList3() {
-      listPersonnelPayStructure(this.queryParams).then((response) => {
+      listPersonnelPayStructure(this.queryParamPayOrder).then((response) => {
         this.structureList3 = response.rows;
       });
     },

+ 26 - 11
src/views/station/Station_Accounting.vue

@@ -11,7 +11,7 @@
       label-width="68px"
     >
       <el-form-item prop="carNumber"
-        >开班时间:{{ opo.startDate }} 班结人:{{ opo.classStructureMan }}
+        >开班时间:{{ opo.endDate }} 班结人:{{ opo.classStructureMan }}
       </el-form-item>
       <el-form-item>
         <el-button
@@ -59,6 +59,7 @@
       <el-table-column label="支付宝金额" align="center" prop="zfbAmt" />
       <el-table-column label="现金金额" align="center" prop="xjAmt" />
       <el-table-column label="会员卡支付" align="center" prop="dzkAmt" />
+      <el-table-column label="退款金额" align="center" prop="refundAmt" />
     </el-table>
     <!-- 添加或修改班结管理对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -106,7 +107,7 @@ export default {
       stationOptions: [],
       opo: {
         classStructureMan: null,
-        startDate: null,
+        endDate: null,
       },
       // 表单参数
       form: {},
@@ -128,21 +129,21 @@ export default {
         // 油站第一次班结
         const PayOrderRes = await getPayOrderInfoMin();
         if(PayOrderRes.data==null){
-          this.opo.startDate ="";
+          this.opo.endDate ="";
         }else{
-          this.opo.startDate = PayOrderRes.data.createdDate;
+          this.opo.endDate = PayOrderRes.data.createdDate;
         }
         this.opo = {
           ...this.opo,
-          startDate: PayOrderRes.data.createdDate,
+          endDate: PayOrderRes.data.createdDate,
         };
         return;
       } else {
         // 油站之前班结过
-        this.opo.startDate = structureRes.data.classStructureDate;
+        this.opo.endDate = structureRes.data.endDate;
         this.opo = {
           ...this.opo,
-          startDate: structureRes.data.classStructureDate,
+          endDate: structureRes.data.endDate,
         };
         return;
       }
@@ -359,6 +360,16 @@ export default {
             }
           }, 0);
           sums[index] = sums[index].toFixed(2);
+           } else if (column.property === "refundAmt") {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return prev;
+            }
+          }, 0);
+          sums[index] = sums[index].toFixed(2);
         } else {
           sums[index] = "";
         }
@@ -398,13 +409,17 @@ export default {
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
+      
       if (
-        this.structureList3 == null &&
-        this.structureList1 == null &&
-        this.structureList2 == null
+        this.structureList3.length == 0 &&
+        this.structureList1.length == 0 &&
+        this.structureList.length == 0
       ) {
         this.msgSuccess("没有要班结的数据");
       } else {
+        console.log( this.structureList3.length);
+        console.log(this.structureList1.length);
+        console.log(this.structureList.length);
         this.open = true;
         this.title = "添加班结管理";
       }
@@ -430,7 +445,7 @@ export default {
         this.queryParams.stationName = this.$store.state.user.stationName;
         this.queryParams.stationId = this.$store.state.user.stationId;
         this.queryParams.classStructureMan = this.$store.state.user.name;
-        this.getClassInfo();
+        this.initFromOrder();
         this.isclose = false;
       });
     },