Procházet zdrojové kódy

班结问题整改

Joe před 4 roky
rodič
revize
31d40c07ee
1 změnil soubory, kde provedl 20 přidání a 75 odebrání
  1. 20 75
      src/views/overview/accountingReport.vue

+ 20 - 75
src/views/overview/accountingReport.vue

@@ -8,7 +8,7 @@
     >
       <el-form-item label="班次号" prop="classesNo">
         <el-input
-          v-model="queryParams.likeClassesNo"
+          v-model="queryParams.classesNo"
           placeholder="请输入班次号"
           clearable
           size="small"
@@ -55,7 +55,7 @@
       </el-form-item>
     </el-form>
 
-    <el-table v-loading="loading" :data="summaryList" :fit="true">
+    <el-table :data="summaryList" :fit="true">
       <af-table-column
         label="班结主键id"
         align="center"
@@ -63,17 +63,9 @@
         v-if="false"
       />
       <af-table-column label="班次号" align="center" prop="classesNo" />
-      <af-table-column
-        label="班次开始时间"
-        align="center"
-        prop="startDate"
-      >
+      <af-table-column label="班次开始时间" align="center" prop="startDate">
       </af-table-column>
-      <af-table-column
-        label="班次结束时间"
-        align="center"
-        prop="endDate"
-      >
+      <af-table-column label="班次结束时间" align="center" prop="endDate">
       </af-table-column>
       <af-table-column
         label="油站id"
@@ -83,11 +75,7 @@
       />
       <af-table-column label="油站名称" align="center" prop="stationName" />
       <af-table-column label="订单数" align="center" prop="orderNum" />
-      <af-table-column
-        label="小票数量"
-        align="center"
-        prop="printNum"
-      />
+      <af-table-column label="小票数量" align="center" prop="printNum" />
       <af-table-column label="销量L" align="center" prop="saleLiters" />
       <af-table-column label="应收金额" align="center" prop="saleAmt" />
       <af-table-column label="实收金额" align="center" prop="amt" />
@@ -110,6 +98,7 @@
         label="操作"
         align="center"
         class-name="small-padding fixed-width"
+        width="120px"
       >
         <template slot-scope="scope">
           <el-button
@@ -156,12 +145,7 @@
       <!--按员工汇总-->
       <span style="color: #ff9955; font-size: 15px">|</span
       ><span style="font-size: 15px">按员工汇总</span>
-      <el-table
-        v-loading="loading"
-        show-summary
-        :data="structureList"
-        :summary-method="getTotal"
-      >
+      <el-table show-summary :data="structureList" :summary-method="getTotal">
         <af-table-column label="员工姓名" align="center" prop="oilPersonnel" />
         <af-table-column label="负责枪号" align="center" prop="oilGun" />
         <af-table-column label="销量" align="center" prop="orderLiters" />
@@ -171,12 +155,7 @@
       <!--按油品汇总-->
       <span style="color: #ff9955; font-size: 15px">|</span
       ><span style="font-size: 15px">按油品汇总</span>
-      <el-table
-        v-loading="loading"
-        :data="structureList1"
-        show-summary
-        :summary-method="getTotal2"
-      >
+      <el-table :data="structureList1" show-summary :summary-method="getTotal2">
         <af-table-column label="油品" align="center" prop="oilName" />
         <af-table-column label="负责枪号" align="center" prop="oilGun" />
         <af-table-column label="销量" align="center" prop="orderLiters" />
@@ -187,7 +166,6 @@
       <span style="color: #ff9955; font-size: 15px">|</span
       ><span style="font-size: 15px">按员工/支付方式汇总</span>
       <el-table
-        v-loading="loading"
         :data="structureList3"
         show-summary
         :summary-method="getTotal3"
@@ -226,8 +204,6 @@ export default {
   name: "accountingReport",
   data() {
     return {
-      // 遮罩层
-      loading: true,
       // 总条数
       total: 0,
       // 【请填写功能名称】表格数据
@@ -240,21 +216,10 @@ export default {
       // 查询参数
       queryParams: {
         pageNum: 1,
-        pageSize: 10,
-        classesNo: null,
+        pageSize: 3,
+        classesNo: "",
         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,
       },
       // 查询参数
       queryParam: {
@@ -321,24 +286,14 @@ export default {
   methods: {
     /** 查询【请填写功能名称】列表 */
     getList() {
-      this.loading = true;
-      this.queryParams.stationId = this.$store.selectDeptId;
-      if (
-        this.queryParams.stationId == null ||
-        this.queryParams.stationId == ""
-      ) {
-        this.queryParams.stationId = this.$store.state.user.deptId;
-      }
-      console.log("这个",this.queryParams, this.dateRangeCreatedDate)
-
+      console.log("这个", this.queryParams, this.dateRangeCreatedDate);
       listSummary(
         this.addDateRange(this.queryParams, this.dateRangeCreatedDate)
       ).then((response) => {
-        console.log("条件",response)
+        console.log("条件", response);
         this.summaryList = response.rows;
         console.log("summaryList", this.summaryList);
         this.total = response.total;
-        this.loading = false;
       });
     },
     // 取消按钮
@@ -394,24 +349,18 @@ export default {
     },
     /** 查询班结管理列表 */
     getStructureList() {
-      this.loading = true;
       listPersonnelStructure(this.queryParams).then((response) => {
         this.structureList = response.rows;
-        this.loading = false;
       });
     },
     getStructureList2() {
-      this.loading = true;
       listOilStructure(this.queryParams).then((response) => {
         this.structureList1 = response.rows;
-        this.loading = false;
       });
     },
     getStructureList3() {
-      this.loading = true;
       listPersonnelPayStructure(this.queryParams).then((response) => {
         this.structureList3 = response.rows;
-        this.loading = false;
       });
     },
     getTotal(param) {
@@ -611,21 +560,17 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport(row) {
-      const classesNo = row.classesNo;
-      this.queryParam.classStructureNo = classesNo;
-      this.queryParam.stationId = row.stationId;
-      const queryParams = this.queryParam;
-      this.$confirm("是否确认导出所有班结数据项?", "警告", {
+      const query = {
+        stationId: this.deptId,
+        classStructureNo: row.classesNo,
+      };
+      this.$confirm("是否确认导出此条记录?", "警告", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-      })
-        .then(function () {
-          return exportStructure(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-        });
+      }).then(function () {
+        exportStructure(query);
+      });
     },
   },
 };