Ver Fonte

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

liyg há 2 anos atrás
pai
commit
b6871e4f06

+ 88 - 88
src/views/RMS/components/addOtherCapacity.vue

@@ -36,8 +36,8 @@
 </template>
 
 <script>
-import PageTitle from "@/components/Page/Title";
-import { getCookie } from "@/utils/util.js";
+import PageTitle from '@/components/Page/Title'
+import { getCookie } from '@/utils/util.js'
 export default {
   components: { PageTitle },
   data() {
@@ -46,11 +46,11 @@ export default {
       form1: {},
       form1Initialization: {
         capacityTypeId: 1,
-        capacityNumber: "",
-        capacityCorlor: "黄",
-        capacityOwneris: "否",
-        capacityVip: "否",
-        capacityBlacklist: "否"
+        capacityNumber: '',
+        capacityCorlor: '黄',
+        capacityOwneris: '否',
+        capacityVip: '否',
+        capacityBlacklist: '否'
       },
       value: undefined,
       carrierIds: null,
@@ -61,101 +61,101 @@ export default {
       userCode: null,
       carrierUserId: null,
       carrierId: null
-    };
+    }
   },
   created() {
-    this.carrierUserId = getCookie("userId");
-    this.form1 = this.form1Initialization;
+    this.carrierUserId = getCookie('userId')
+    this.form1 = this.form1Initialization
     // console.log(this.carrierUserId, "carrierUserId");
   },
   mounted() {
     this.axios
       .post(
-        "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
+        '/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=' + this.carrierUserId
       )
       .then(res => {
-        if (res.data.code == "200") {
+        if (res.data.code == '200') {
           // console.log(res.data.data);
           if (res.data.data) {
-            this.state = res.data.data.carrierName;
-            this.carrierIds = res.data.data.carrierId;
+            this.state = res.data.data.carrierName
+            this.carrierIds = res.data.data.carrierId
           }
         }
-      });
+      })
   },
   methods: {
     //承运商弹出层
     handleSelect(item) {
-      this.carrierIds = item.carrierId;
-      item.carrierName = this.state;
+      this.carrierIds = item.carrierId
+      item.carrierName = this.state
     },
     //以下是承运商边输边查搜索
     querySearch(queryString, cb) {
       this.axios
-        .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+        .post('/api/v1/uc/getCarrierMesByLike?index=' + queryString)
         .then(res => {
-          if (res.data.code == "200") {
+          if (res.data.code == '200') {
             // console.log(res.data.data);
-            var restaurants = res.data.data;
+            var restaurants = res.data.data
             // console.log(restaurants, "restaurants");
             var results = queryString
               ? restaurants.filter(this.createFilter(queryString))
-              : restaurants;
+              : restaurants
             // 调用 callback 返回建议列表的数据
-            cb(results);
+            cb(results)
           }
-        });
+        })
     },
     createFilter(queryString) {
       return restaurants => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
-        );
-      };
+        )
+      }
     },
     //以上是承运商边输边查搜索
     deleteUser(userId) {
-      this.axios.delete("pass/v1/sysusers/" + userId).then(res => {
-        this.$message.error("添加失败,车牌可能重复");
-      });
+      this.axios.delete('pass/v1/sysusers/' + userId).then(res => {
+        this.$message.error('添加失败,车牌可能重复')
+      })
     },
     insertRole(userId, userCode) {
       this.axios
         .post(
-          "pass/v1/sysuserroles/addUserroles?userId=" +
+          'pass/v1/sysuserroles/addUserroles?userId=' +
             userId +
-            "&userCode=" +
+            '&userCode=' +
             userCode +
-            "&roleId=" +
-            "956144357092757504"
+            '&roleId=' +
+            '956144357092757504'
         )
         .then(res => {
-          if (res.code === "0") {
-            this.$message.success("操作成功");
-            this.saveLoading = false;
-            this.rolesTree.loading = false;
+          if (res.code === '0') {
+            this.$message.success('操作成功')
+            this.saveLoading = false
+            this.rolesTree.loading = false
           } else {
-            this.$message.error(res.message);
+            this.$message.error(res.message)
           }
-        });
+        })
     },
     makeSure() {
-      this.addLoading = true;
+      this.addLoading = true
       // if (!this.isVehicleNumber(this.form1.capacityNumber.toUpperCase())) {
       //   this.$message.error("车牌号格式不正确");
       //   this.addLoading = false;
       //   return;
       // }
-      if (this.form1.capacityNumber.length <= 2) {
-        this.$message.error("车牌号必须大于三位");
-        this.addLoading = false;
-        return;
+      if (this.form1.capacityNumber.length < 2) {
+        this.$message.error('车牌号必须大于三位')
+        this.addLoading = false
+        return
       }
       if (this.carrierIds == null) {
-        this.$message.error("请选择承运商");
-        this.addLoading = false;
-        return;
+        this.$message.error('请选择承运商')
+        this.addLoading = false
+        return
       }
       let RmsCapacity = {
         capacityTypeId: this.form1.capacityTypeId,
@@ -167,7 +167,7 @@ export default {
         remark: this.form1.remark,
         carrierId: this.carrierIds,
         state: this.state
-      };
+      }
       if (
         RmsCapacity.capacityNumber == null ||
         RmsCapacity.capacityCorlor == null ||
@@ -175,84 +175,84 @@ export default {
         RmsCapacity.capacityVip == null ||
         RmsCapacity.capacityBlacklist == null
       ) {
-        this.$message.error("存在空值!");
-        this.addLoading = false;
+        this.$message.error('存在空值!')
+        this.addLoading = false
       } else {
         //新增SSO运力账号
-        var formData = new FormData();
-        formData.append("userCode", this.form1.capacityNumber.toUpperCase());
-        formData.append("orgCode", "yunli");
-        formData.append("orgName", "运力");
-        formData.append("groupId", "506514577756917769");
-        formData.append("companyId", "713710108567277568");
-        formData.append("orgId", "924126716337721344");
+        var formData = new FormData()
+        formData.append('userCode', this.form1.capacityNumber.toUpperCase())
+        formData.append('orgCode', 'yunli')
+        formData.append('orgName', '运力')
+        formData.append('groupId', '506514577756917769')
+        formData.append('companyId', '713710108567277568')
+        formData.append('orgId', '924126716337721344')
         // console.log(formData.get("userCode"));
         // console.log(typeof formData);
         this.$store
-          .dispatch("system/usersManage/addUser", formData)
+          .dispatch('system/usersManage/addUser', formData)
           .then(res => {
             // console.log(res);
-            if (res.code === "0") {
+            if (res.code === '0') {
               // console.log(res.data.userId);
-              this.userId = res.data.userId;
-              this.userCode = res.data.userCode;
-              RmsCapacity.ssoId = res.data.userId;
+              this.userId = res.data.userId
+              this.userCode = res.data.userCode
+              RmsCapacity.ssoId = res.data.userId
               this.axios
-                .post("/api/v1/rms/insertCapacity", RmsCapacity)
+                .post('/api/v1/rms/insertCapacity', RmsCapacity)
                 .then(res => {
                   if (res.data.data == 1) {
-                    this.insertRole(this.userId, this.userCode);
-                    this.$message.success("添加成功");
-                    this.$router.push("capacity");
-                  } else if (res.data.code == "201") {
-                    this.deleteUser(this.userId);
+                    this.insertRole(this.userId, this.userCode)
+                    this.$message.success('添加成功')
+                    this.$router.push('capacity')
+                  } else if (res.data.code == '201') {
+                    this.deleteUser(this.userId)
                   } else {
-                    this.deleteUser(this.userId);
+                    this.deleteUser(this.userId)
                   }
-                });
+                })
             } else {
               // console.log(RmsCapacity, "RmsCapacity");
-              if (res.message == "账号已被注册") {
+              if (res.message == '账号已被注册') {
                 this.$confirm(
-                  "该账号已经被注册, 是否确定新增承运商绑定关系?",
-                  "提示",
+                  '该账号已经被注册, 是否确定新增承运商绑定关系?',
+                  '提示',
                   {
-                    confirmButtonText: "确定",
-                    cancelButtonText: "取消",
-                    type: "warning"
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
                   }
                 )
                   .then(() => {
                     this.axios
-                      .post("/api/v1/rms/insertCapacity", RmsCapacity)
+                      .post('/api/v1/rms/insertCapacity', RmsCapacity)
                       .then(res => {
                         // console.log(res, "res");
                         if (res.data.data == 0) {
-                          this.$message.success("新增承运商绑定关系成功!");
-                          this.$router.push("capacity");
+                          this.$message.success('新增承运商绑定关系成功!')
+                          this.$router.push('capacity')
                         } else {
-                          this.$message.error("该绑定关系已存在!");
+                          this.$message.error('该绑定关系已存在!')
                         }
-                      });
+                      })
                   })
                   .catch(() => {
                     this.$message({
-                      type: "info",
-                      message: "已取消删除"
-                    });
-                  });
+                      type: 'info',
+                      message: '已取消删除'
+                    })
+                  })
               }
             }
-          });
-        this.addLoading = false;
+          })
+        this.addLoading = false
       }
     },
     // 取消
     cancel() {
-      this.$router.go(-1);
+      this.$router.go(-1)
     }
   }
-};
+}
 </script>
 <style lang="scss">
 .addCapacity {

+ 0 - 1
src/views/appoint/components/saleContract/saleOrderCoproductCarrier.vue

@@ -135,7 +135,6 @@ export default {
       //       this.$message.error('该订单在金蝶已关闭,无法派车')
       //       return
       //     } else {
-
       //     }
       //   })
     },

+ 0 - 1
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelDetails.vue

@@ -391,7 +391,6 @@ export default {
       this.originalAddress = row.realAddress
       this.originalPriceValue = row.priceValue
       this.detailsId = row.detailsId
-
       this.Address.requestUrl =
         '/api/v1/ams/getAddressDeliveryAddress?apiId=511&i=' + new Date()
       this.dialogFormVisible = true

+ 9 - 2
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -1386,7 +1386,11 @@ export default {
     },
     //以下是车牌号边输边查搜索
     querySearch(queryString, cb) {
-      if (queryString != null && queryString != '' && queryString.length > 3) {
+      console.log(queryString)
+      if (
+        (queryString != null && queryString != '' && queryString.length > 3) ||
+        queryString == '取消'
+      ) {
         this.axios
           .post('/api/v1/uc/getCapacityByLike?index=' + queryString)
           .then(res => {
@@ -1429,7 +1433,10 @@ export default {
         this.$message.warning('请先注册车牌号或者选中弹出后再提交!')
         return
       }
-      if (!isVehicleNumber(this.steelMap.capacityNo)) {
+      if (
+        !isVehicleNumber(this.steelMap.capacityNo) &&
+        this.steelMap.capacityNo != '取消'
+      ) {
         this.$message.error('请输入正确格式的车牌号!')
         return
       }

+ 1076 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/unloadingSteelReports.vue

@@ -0,0 +1,1076 @@
+//钢材统计报表
+<template>
+  <div class="purchasFuelNewMonitor">
+    <div class="tableTop">
+      <el-form :inline="true" style="margin-top :5px">
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="请选择需筛选的内容"
+            clearable
+            @change="changeScreen"
+            style="width:100px"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            style="width:170px"
+            v-model="input"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen1"
+            placeholder="请选择需筛选的内容"
+            clearable
+            style="width:100px"
+          >
+            <el-option
+              v-for="item in options1"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            style="width:170px"
+            v-model="input1"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;"
+            >订单日期:</label
+          >
+          <el-date-picker
+            v-model="startTime"
+            type="date"
+            placeholder="选择日期"
+            style="width:150px"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="date"
+            placeholder="选择日期"
+            style="width:150px"
+          >
+          </el-date-picker>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>
+          </el-button>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="exportAllReportToExcel"
+            >下载Excel</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="addSaleOrder"
+            >重新生成计划</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="refresh">
+            <i class="el-icon-refresh"></i>
+          </el-button>
+        </el-form-item>
+        <el-form-item>
+          <span style="margin-left: 1rem;font-size:16px">车数/件数:</span>
+          <span style="font-size:16px"
+            >{{ totalCapacity }}/{{ totalNumber }}</span
+          >
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="table">
+      <el-table
+        :data="tableData"
+        :span-method="objectSpanMethod"
+        ref="tableRef"
+        border
+        style="width: 100%; margin-top: 20px"
+        :max-height="maxHeight"
+        :height="maxHeight"
+        @filter-change="filterChange"
+        @selection-change="handleSelectionChange"
+        :lazy="true"
+      >
+        <el-table-column
+          type="selection"
+          width="50"
+          align="center"
+          fixed="left"
+        >
+        </el-table-column>
+        <el-table-column
+          width="50"
+          label="序号"
+          align="center"
+          :resizable="false"
+        >
+          <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+        </el-table-column>
+        <el-table-column
+          prop="orderTime"
+          label="订单日期"
+          width="110px"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="saleOrderStatus"
+          label="销售订单状态"
+          width="100px"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="consigneeName"
+          label="客户"
+          width="160px"
+          align="center"
+          column-key="consigneeName"
+          :filters="filterConsigneeList"
+          sortable
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="areaName"
+          label="销售片区"
+          width="150px"
+          align="center"
+          column-key="saleAreaList"
+          :filters="filterSaleAreaList"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="carrierName"
+          label="承运商"
+          align="center"
+          width="80px"
+          column-key="carrierList"
+          sortable
+          show-overflow-tooltip
+          :filters="filterCarrierList"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="capacityNo"
+          column-key="capacityNo"
+          label="车牌号"
+          align="center"
+          width="90px"
+          sortable
+          show-overflow-tooltip
+          :filters="filterCapacityList"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialName"
+          column-key="materialNameList"
+          label="物资名称"
+          align="center"
+          width="150px"
+          sortable
+          :filters="filtermaterialNameList"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialSpe"
+          label="物资规格"
+          align="center"
+          sortable
+          show-overflow-tooltip
+          width="120px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialNum"
+          label="物资件数"
+          align="center"
+          width="50px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="addressPlace"
+          label="收货地址"
+          width="250px"
+          sortable
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="orderStatus"
+          label="运单状态"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="entryGateTime"
+          label="进厂时间"
+          width="130px"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="tareWeightTime"
+          label="皮重时间"
+          width="130px"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column prop="tareWeight" label="皮重" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column
+          prop="loadTime"
+          label="装货时间"
+          width="130px"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="grossWeightTime"
+          label="毛重时间"
+          width="130px"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column prop="grossWeight" label="毛重" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column prop="netWeight" label="净重" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column
+          prop="orderNo"
+          label="运输订单号"
+          width="180px"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="capacityTel"
+          label="司机电话"
+          width="120px"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="saler"
+          label="业务员"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="shipperName"
+          label="发货单位"
+          width="170px"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="consigneeTel"
+          label="收货客户电话"
+          width="120px"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column prop="isSelfMention" label="是否自提" align="center">
+        </el-table-column>
+        <el-table-column
+          prop="saleOrderNo"
+          label="销售订单号"
+          width="200px"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="closeEntryId"
+          label="金蝶分录ID"
+          width="100px"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+import { sjTime, isVehicleNumber } from '@/utils/sharedJsFile'
+import { getCookie } from '@/utils/util.js'
+export default {
+  data() {
+    return {
+      carNumber: '',
+      //弹出框
+      centerDialogVisible: false,
+      //根据车序号查询的值
+      steelMap: {},
+      //钢材子表数据
+      steelList: [],
+      drawer: false,
+      isShow3: false,
+      isShow4: false,
+      input: null,
+      screen: '',
+      screen1: '',
+      options: [
+        {
+          value: '客户',
+          lable: '客户'
+        },
+        {
+          value: '承运商',
+          lable: '承运商'
+        },
+        {
+          value: '车牌号',
+          lable: '车牌号'
+        },
+        {
+          value: '分录ID',
+          lable: '分录ID'
+        }
+      ],
+      options1: [
+        {
+          value: '客户',
+          lable: '客户'
+        },
+        {
+          value: '承运商',
+          lable: '承运商'
+        },
+        {
+          value: '车牌号',
+          lable: '车牌号'
+        }
+      ],
+      startTime: null,
+      endTime: null,
+      //合计净重
+      totalNumber: 0,
+      //合计车数
+      totalCapacity: 0,
+      tableTitle: '销售统计报表',
+      capacityList: [],
+      carrierList: [],
+      tableData: [],
+      //筛选条件1(客户)
+      filters1: [],
+      spanArr: [],
+      pos: 0,
+      //需要合并列的名称
+      mergeList: [
+        '序号',
+        '整车操作',
+        '销售订单状态',
+        '销售订单号',
+        '发货单位',
+        '司机电话',
+        '运输订单号',
+        '签收地址',
+        '签收时间',
+        '抵达地址',
+        '抵达时间',
+        '出厂时间',
+        '进厂时间',
+        '运单状态',
+        '车牌号',
+        '承运商',
+        '客户',
+        '收货地址',
+        '业务员',
+        '送货单打印',
+        '收货客户电话',
+        '是否自提',
+        '订单日期',
+        '短信发送',
+        '销售片区',
+        '抵达时间',
+        '签收时间'
+      ],
+      //钢材多拼车辆线路ID
+      //索引从1-10为1-10拼路线ID
+      lineSpelling: [
+        0,
+        110001,
+        110002,
+        110003,
+        110004,
+        110005,
+        110006,
+        110007,
+        110008,
+        110009,
+        110010
+      ],
+      tableTitle: '销售钢材统计报表',
+      //所有省
+      provinceList: [],
+      //选中的省
+      province: '',
+      //所有市
+      cityList: [],
+      //选中的市
+      city: '',
+      //所有的县(区)
+      countyList: [],
+      //选中的县
+      county: '',
+      //地址输入框的值
+      addresText: '',
+      //已选中省市县
+      address: null,
+      //具体地址
+      place: null,
+      //暂存具体地址
+      place1: null,
+      //省市县Id
+      addressId: null,
+      addressRow: {},
+      input1: '',
+      maxHeight: window.innerHeight - 140,
+      tableRowIndex: '',
+      isRowClick: 0,
+      orgCodeList: [
+        'wuliuyunshubu',
+        'dagangadmin',
+        'shichangxinxibu',
+        'xiaoshouyewuyuan',
+        'zidonghuabu'
+      ],
+      isShowOperate: false,
+      filterConsigneeList: [],
+      filterCarrierList: [],
+      filterCapacityList: [],
+      filtermaterialNameList: [],
+      filterSaleAreaList: [],
+      filterMap: {},
+      //销售订单主表数据
+      saleOrderList: [
+        'receiveName',
+        'isSelfMention',
+        'saleRemark',
+        'saleOrderReceiveCustomer',
+        'salerName',
+        'saleOrderNo',
+        'saleArea'
+      ],
+      saleOrderMapList: [
+        'truckNo',
+        'province',
+        'district',
+        'town',
+        'truckRemark',
+        'place',
+        'saleOrderConsigneeTel',
+        'saleDateOfReceipt',
+        'materialName',
+        'materialSpecification',
+        'materialModel',
+        'materialNumber',
+        'steelMeters',
+        'isPoundSale'
+      ]
+    }
+  },
+  created() {
+    if (this.orgCodeList.includes(getCookie('orgCode'))) {
+      this.isShowOperate = true
+    }
+    this.getSteelReport()
+  },
+  watch: {
+    tableData: {
+      handler(oldVal, newVal) {
+        this.filterListChange()
+      },
+      deep: true,
+      immediate: true
+    }
+  },
+  computed: {},
+  mounted() {
+    this.$nextTick(() => {
+      window.onresize = () => {
+        return (() => {
+          this.maxHeight = window.innerHeight - 150
+        })()
+      }
+    })
+  },
+  activated() {
+    this.maxHeight = window.innerHeight - 150
+  },
+  computed: {},
+  methods: {
+    handleSelectionChange() {},
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = []
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1)
+          data[i].group = i
+          this.pos = 0
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
+            this.spanArr[this.pos] += 1
+            data[i].group = data[i - 1].group
+            this.spanArr.push(0)
+          } else {
+            this.spanArr.push(1)
+            this.pos = i
+            data[i].group = data[i - 1].group + 1
+          }
+        }
+        this.totalCapacity = data[data.length - 1].group + 1
+        this.totalNumber = data.reduce(function(prev, item) {
+          return prev + item.materialNum
+        }, 0)
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeList.indexOf(column.label) != -1) {
+        const _row = this.spanArr[rowIndex]
+        const _col = _row > 0 ? 1 : 0
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      }
+    },
+    addSaleOrder() {
+      this.tableData.forEach(e => {
+        e.saleRemark = `${this.getRemarkDate()}${e.areaName},直发${
+          e.addressDistrict
+        }`
+      })
+      const map1 = this.tableData.reduce((result, item) => {
+        result[item.saleOrderNo] = result[item.saleOrderNo] || []
+        result[item.saleOrderNo].push(item)
+        return result
+      }, {})
+      let result = Object.values(map1)
+      //遍历数组
+      let saleOrderListMap = []
+      console.log(result)
+      result.forEach((saleOrderList, index) => {
+        let map = {}
+        let arr = []
+        saleOrderList.forEach(e => {
+          let mapMaterial = {}
+          Object.keys(e).forEach(e1 => {
+            if (this.saleOrderList.includes(e1)) {
+              map[e1] = e[e1]
+            }
+            if (this.saleOrderMapList.includes(e1)) {
+              mapMaterial[e1] = e[e1]
+            }
+          })
+          mapMaterial.saleDateOfReceipt = sjTime(this.saleDateOfReceipt)
+          arr.push(mapMaterial)
+        })
+        map.shipperId = 1
+        map.mapList = arr
+        saleOrderListMap.push(map)
+      })
+      console.log(saleOrderListMap)
+    },
+    getRemarkDate() {
+      let day = new Date().getDate()
+      let month = new Date().getMonth() + 1
+      console.log(day)
+      if (day < 10) {
+        day = '0' + day
+      }
+      return `${month}.${day}`
+    },
+    //继续装
+    //筛选
+    filterChange(obj) {
+      if (typeof obj.carrierList != 'undefined' && obj.carrierList.length > 0) {
+        this.filterMap.carrierList = obj.carrierList
+      }
+      if (
+        typeof obj.carrierList != 'undefined' &&
+        obj.carrierList.length == 0
+      ) {
+        delete this.filterMap.carrierList
+      }
+      if (
+        typeof obj.materialNameList != 'undefined' &&
+        obj.materialNameList.length > 0
+      ) {
+        this.filterMap.materialNameList = obj.materialNameList
+      }
+      if (
+        typeof obj.materialNameList != 'undefined' &&
+        obj.materialNameList.length == 0
+      ) {
+        delete this.filterMap.materialNameList
+      }
+      if (typeof obj.capacityNo != 'undefined' && obj.capacityNo.length > 0) {
+        this.filterMap.capacityList = obj.capacityNo
+      }
+      if (typeof obj.capacityNo != 'undefined' && obj.capacityNo.length == 0) {
+        delete this.filterMap.capacityList
+      }
+      if (
+        typeof obj.consigneeName != 'undefined' &&
+        obj.consigneeName.length > 0
+      ) {
+        this.filterMap.consigneeNameList = obj.consigneeName
+      }
+      if (
+        typeof obj.consigneeName != 'undefined' &&
+        obj.consigneeName.length == 0
+      ) {
+        delete this.filterMap.consigneeNameList
+      }
+      if (
+        typeof obj.saleAreaList != 'undefined' &&
+        obj.saleAreaList.length > 0
+      ) {
+        this.filterMap.saleAreaList = obj.saleAreaList
+      }
+      if (
+        typeof obj.saleAreaList != 'undefined' &&
+        obj.saleAreaList.length == 0
+      ) {
+        delete this.filterMap.saleAreaList
+      }
+      // if (obj)
+      this.onclick(this.filterMap)
+    },
+    //控制筛选数组变化
+    filterListChange() {
+      let consigneeNameList = this.tableData.map(e => {
+        return e.consigneeName
+      })
+      let carrierNameList = this.tableData.map(e => {
+        return e.carrierName
+      })
+      let capacityList = this.tableData.map(e => {
+        return e.capacityNo
+      })
+      let materialNameList = this.tableData
+        .map(e => {
+          return e.materialName
+        })
+        .filter(e => {
+          return e != null
+        })
+      let saleAreaList = this.tableData
+        .map(e => {
+          return e.areaName
+        })
+        .filter(e => {
+          return e != null
+        })
+      this.filterConsigneeList = []
+      this.filterCarrierList = []
+      this.filterCapacityList = []
+      this.filtermaterialNameList = []
+      this.filterSaleAreaList = []
+      Array.from(new Set(consigneeNameList)).forEach(e => {
+        let map = {}
+        map.text = e
+        map.value = e
+        this.filterConsigneeList.push(map)
+      })
+      Array.from(new Set(carrierNameList)).forEach(e => {
+        let map = {}
+        map.text = e
+        map.value = e
+        this.filterCarrierList.push(map)
+      })
+      Array.from(new Set(capacityList)).forEach(e => {
+        let map = {}
+        map.text = e
+        map.value = e
+        this.filterCapacityList.push(map)
+      })
+      Array.from(new Set(materialNameList)).forEach(e => {
+        let map = {}
+        map.text = e
+        map.value = e
+        this.filtermaterialNameList.push(map)
+      })
+      Array.from(new Set(saleAreaList)).forEach(e => {
+        let map = {}
+        map.text = e
+        map.value = e
+        this.filterSaleAreaList.push(map)
+      })
+    },
+    //筛选
+    //筛选客户
+    //点击操作弹出框
+    operation(row) {
+      this.isRowClick = 0
+      if (Object.values(this.steelMap).length == 0) {
+        this.$message.error('请点击需要执行更改操作的行!')
+        return
+      }
+      if (typeof row === 'undefined') {
+        row = this.steelMap
+      }
+      this.axios
+        .post(
+          '/api/v1/tms/getSteelReportDetailsBySmId?saleOrderMaterialId=' +
+            row.saleOrderMaterialId
+        )
+        .then(res => {
+          this.steelMap = res.data.data
+          this.addressId = row.shipperAddressId
+          this.getAllProvince()
+          this.onchangeProvince()
+          this.onchangeCity()
+          this.centerDialogVisible = true
+        })
+    },
+    //销售钢材报表导出excel
+    exportAllReportToExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: '正在导出Excel',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      var title = this.tableTitle
+      let tHeader = []
+      let filterVal = []
+      console.log(this.$refs.tableRef)
+      this.$refs.tableRef.$children.forEach(item => {
+        if (item.label != undefined && item.prop != undefined) {
+          if (tHeader.indexOf(item.label) === -1) {
+            tHeader.push(item.label)
+          }
+          if (filterVal.indexOf(item.prop) === -1) {
+            filterVal.push(item.prop)
+          }
+        }
+      })
+      this.downloadLoading = true
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require('@/assets/excel/Export2Excel.js') //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        let data = this.tableData.map(v => filterVal.map(j => v[j])) //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title) // (title)导出的表格名称
+      })
+      loading.close()
+    },
+    changeScreen() {},
+    //承运商弹出层
+    //查询,输入查询条件
+    onclick(obj) {
+      this.isRowClick = 0
+      const loading = this.$loading({
+        lock: true,
+        text: '正在获取数据',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      let startTime = null
+      let endTime = null
+      let carrierSsoId = null
+      let carrierName = null
+      let consigneeName = null
+      let capacityNo = null
+      let remark = null
+      let saler = null
+      let easPrimaryId = null
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime)
+        endTime = sjTime(this.endTime)
+      }
+      if (getCookie('orgCode') == 'chengyunshang') {
+        carrierSsoId = getCookie('userId')
+      }
+      if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
+        saler = getCookie('loginName')
+      }
+      if (this.screen == '客户') {
+        consigneeName = this.input
+      } else if (this.screen == '承运商') {
+        carrierName = this.input
+      } else if (this.screen == '车牌号') {
+        capacityNo = this.input
+      } else if (this.screen == '分录ID') {
+        easPrimaryId = this.input
+      } else {
+        remark = this.input
+      }
+      if (this.screen1 == '客户') {
+        consigneeName = this.input1
+      } else if (this.screen1 == '承运商') {
+        carrierName = this.input1
+      } else if (this.screen1 == '车牌号') {
+        capacityNo = this.input1
+      } else {
+        remark = this.input1
+      }
+      this.axios
+        .post(
+          '/api/v1/tms/loadingSaleSteelReport?startTime=' +
+            startTime +
+            '&endTime=' +
+            endTime +
+            '&carrierSsoId=' +
+            carrierSsoId +
+            '&i=' +
+            new Date() +
+            '&remark=' +
+            remark +
+            '&consigneeName=' +
+            consigneeName +
+            '&carrierName=' +
+            carrierName +
+            '&capacityNo=' +
+            capacityNo +
+            '&saler=' +
+            saler +
+            '&easPrimaryId=' +
+            easPrimaryId,
+          obj
+        )
+        .then(res => {
+          this.tableData = res.data.data
+          this.filters1 = res.data.data.consigneeName
+          console.log('客户数据')
+          console.log(res.data.data.consigneeName)
+          this.getSpanArr(res.data.data)
+          loading.close()
+        })
+    },
+    //重新获取表格数据
+    refresh() {
+      this.getSteelReport()
+    },
+    //获取钢材统计报表
+    getSteelReport() {
+      this.isRowClick = 0
+      let startTime = null
+      let endTime = null
+      let carrierSsoId = null
+      let carrierName = null
+      let consigneeName = null
+      let capacityNo = null
+      let remark = null
+      let saler = null
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime)
+        endTime = sjTime(this.endTime)
+      }
+      if (getCookie('orgCode') == 'chengyunshang') {
+        carrierSsoId = getCookie('userId')
+      }
+      if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
+        saler = getCookie('loginName')
+      }
+      if (this.screen == '客户') {
+        consigneeName = this.input
+      } else if (this.screen == '承运商') {
+        carrierName = this.input
+      } else if (this.screen == '车牌号') {
+        capacityNo = this.input
+      } else {
+        remark = this.input
+      }
+      if (this.screen1 == '下单客户') {
+        consigneeName = this.input1
+      } else if (this.screen == '承运商') {
+        carrierName = this.input1
+      } else if (this.screen == '车牌号') {
+        capacityNo = this.input1
+      } else {
+        remark = this.input1
+      }
+      if (getCookie('orgCode') == 'chengyunshang') {
+        carrierSsoId = getCookie('userId')
+      }
+      if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
+        saler = getCookie('loginName')
+      }
+      this.axios
+        .post(
+          '/api/v1/tms/loadingSaleSteelReport?startTime=' +
+            startTime +
+            '&endTime=' +
+            endTime +
+            '&carrierSsoId=' +
+            carrierSsoId +
+            '&saler=' +
+            saler +
+            '&i=' +
+            new Date() +
+            '&remark=' +
+            remark +
+            '&consigneeName=' +
+            consigneeName +
+            '&carrierName=' +
+            carrierName +
+            '&capacityNo=' +
+            capacityNo
+        )
+        .then(res => {
+          this.tableData = res.data.data
+          this.getSpanArr(res.data.data)
+        })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.purchasFuelNewMonitor {
+  .tableTop {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+    .el-tooltip {
+      width: auto !important;
+    }
+    ::-webkit-scrollbar {
+      // width: 20px;
+      height: 20px;
+      background-color: transparent;
+    }
+  }
+  .dialog {
+    .steelMapClass {
+      .steelMapClass1 {
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass12 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+      }
+      .steelMapClass2 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass22 {
+          margin-left: 50px;
+          margin-right: 10px;
+          .el-select {
+            .el-input .el-input--suffix {
+              .el-input__inner {
+                border: 0px solid !important;
+              }
+            }
+          }
+        }
+      }
+      .steelMapClass3 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass32 {
+          margin-left: 50px;
+          // margin-right: 10px;
+        }
+        .steelMapClass33 {
+          margin-left: 20px;
+          // margin-right: 10px;
+        }
+      }
+      .steelMapClass4 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+
+        .steelMapClass42 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+        .steelMapClass43 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+        .steelMapClass44 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+      }
+      .steelMapClass5 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+
+        .steelMapClass52 {
+          margin-left: 50px;
+          margin-right: 10px;
+          .steelMapClass521 {
+            margin-left: 20px;
+          }
+        }
+      }
+      .steelMapClass6 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass62 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+      }
+    }
+  }
+  .address {
+    .button-box {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
+  }
+}
+</style>

+ 12 - 0
src/views/statisticalReport/router/index.js

@@ -39,6 +39,10 @@ import wagonWorkReport from '../components/wanzhouReport/wagonWorkReport.vue'
 import saleSteelCarrierReport from '@/views/statisticalReport/components/salesLogisticsStatistics/saleSteelCarrierReport'
 import saleSteelReports from '@/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports'
 import mapTest from '../components/salesLogisticsStatistics/mapTest.vue'
+const unloadingSteelReports = () =>
+  import(
+    '@/views/statisticalReport/components/salesLogisticsStatistics/unloadingSteelReports.vue'
+  )
 Vue.use(Router)
 
 const constantRouterMap = [
@@ -260,6 +264,14 @@ const constantRouterMap = [
           code: 'xtpzgl-yhgl'
         },
         component: mapTest
+      },
+      {
+        path: 'unloadingSteelReports',
+        name: 'unloadingSteelReports',
+        meta: {
+          code: 'xtpzgl-yhgl'
+        },
+        component: unloadingSteelReports
       }
     ]
   }