luobang 3 年之前
父节点
当前提交
d6d71a694f

+ 2 - 1
build/utils.js

@@ -16,7 +16,8 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 // let devModules = ["index", "appoint", "statisticalReport"];
-let devModules = ["all"];
+// let devModules = ["index", "statisticalReport", "appoint", "TMS"];
+let devModules = ["index", "statisticalReport"];
 
 // let devModules = ['index','appoint','sale','statisticalReport','RMS','TMS','WMS']
 // let devModules = ["index", "ADMINISTRATORS", "RMS"];

+ 2 - 1
config/index.js

@@ -65,8 +65,9 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://172.16.33.166:80",
+    // target: "http://172.16.33.166:80",
     // target: "http://localhost:8080",
+    target: "http://192.168.1.105:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 1 - 0
src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.js

@@ -67,6 +67,7 @@ export default {
           }
         }
       }
+      this.$emit("funs", data);
     },
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
       if (this.columnIndexs.indexOf(columnIndex) != -1) {

+ 9 - 5
src/views/TMS/components/importedShip/shipmentInstructionText.vue

@@ -120,6 +120,7 @@
               </th>
             </tr>
           </table>
+
           <table
             border="1"
             cellpadding="10"
@@ -148,7 +149,7 @@
             </tr>
           </table>
         </div>
-        <div>
+        <div class="luokuan">
           <!-- tablePart6 -->
           <table
             border="0"
@@ -234,7 +235,7 @@ export default {
   data() {
     return {
       shipmentInstructionLists: [],
-      htmlTitle: "装船通知单",
+      htmlTitle: "装船通知单"
     };
   },
   created() {
@@ -252,13 +253,13 @@ export default {
       console.log(this.shipmentInstructionLists);
       // this.amsShipDeliveryNameLists = this.$route.params.test;
       console.log(this.shipmentInstructionLists);
-      this.shipmentInstructionLists.forEach((e) => {
+      this.shipmentInstructionLists.forEach(e => {
         e.year = e.instructionTime.split("-")[0];
         e.month = e.instructionTime.split("-")[1];
         e.date = e.instructionTime.split("-")[2].split(" ")[0];
       });
-    },
-  },
+    }
+  }
 };
 </script>
 
@@ -315,6 +316,9 @@ export default {
     border-top: 0px;
   }
 }
+.luokuan {
+  margin-top: 150px !important;
+}
 .blank {
   width: 100%;
   height: 50px;

+ 14 - 9
src/views/appoint/components/saleContract/addSaleOrderSteelSendCarrier.vue

@@ -158,7 +158,9 @@
 
     <div class="button_box">
       <el-button @click="cancel">取消</el-button>
-      <el-button type="primary" @click="makeSure" :loading="isLoading">确定</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading"
+        >确定</el-button
+      >
     </div>
   </div>
 </template>
@@ -172,7 +174,7 @@ export default {
   data() {
     return {
       //是否正在加载
-      isLoading:false,
+      isLoading: false,
       //存放每一行记录的合并数
       spanArr: [],
       //pos是spanArr的索引
@@ -284,11 +286,15 @@ export default {
   },
   methods: {
     getValue() {
+      let map = {};
+      if (getCookie("orgCode") == "chengyunshang") {
+        map.saleOrderId = this.$route.params.saleOrderId;
+        map.carrierSsoId = getCookie("userId");
+      } else {
+        map.saleOrderId = this.$route.params.saleOrderId;
+      }
       this.axios
-        .post(
-          "/api/v1/ams/getTruckNoAndMaterialList?saleOrderId=" +
-            this.$route.params.saleOrderId
-        )
+        .post("/api/v1/ams/getCarrierTruckNoAndMaterialList", map)
         .then(res => {
           if (res.data.data.length == 0) {
             this.$confirm("该销售订单尚未排车!是否先进行排车?", "提示", {
@@ -429,7 +435,6 @@ export default {
     },
     //车牌号弹出层
     handleSelect(row, index) {
-      console.log(index);
       this.axios
         .post(
           "/api/v1/ams/matchingDriverTelRecently?capacityNumber=" +
@@ -477,7 +482,7 @@ export default {
     },
     //点击确定按钮的事件
     makeSure() {
-      this.isLoading=true;
+      this.isLoading = true;
       //是否可发送请求
       if (this.canSend == -1) {
         this.$message.warning("电话号码格式不正确,请输入正确的电话号码!");
@@ -523,7 +528,7 @@ export default {
                 } else {
                   this.$message.error("派单失败:" + res.data.data);
                 }
-                this.isLoading=false;
+                this.isLoading = false;
               });
           })
           .catch(() => {

+ 0 - 0
src/views/appoint/components/saleContract/copySteelOrder.vue


+ 8 - 5
src/views/appoint/components/ship/attorneytext.vue

@@ -135,7 +135,7 @@
             </tr>
           </table>
         </div>
-        <div>
+        <div class="luokuan">
           <!-- tablePart6 -->
           <table
             border="0"
@@ -223,7 +223,7 @@ export default {
   data() {
     return {
       amsShipDeliveryNameLists: [],
-      htmlTitle: "委托书",
+      htmlTitle: "委托书"
     };
   },
   created() {
@@ -241,13 +241,13 @@ export default {
       console.log(this.amsShipDeliveryNameLists);
       // this.amsShipDeliveryNameLists = this.$route.params.test;
       console.log(this.amsShipDeliveryNameLists);
-      this.amsShipDeliveryNameLists.forEach((e) => {
+      this.amsShipDeliveryNameLists.forEach(e => {
         e.year = e.attorneyTime.split("-")[0];
         e.month = e.attorneyTime.split("-")[1];
         e.date = e.attorneyTime.split("-")[2].split(" ")[0];
       });
-    },
-  },
+    }
+  }
 };
 </script>
 
@@ -272,6 +272,9 @@ export default {
     width: 260px;
   }
 }
+.luokuan {
+  margin-top: 150px !important;
+}
 .tableBody {
   table,
   th,

+ 19 - 8
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -262,9 +262,6 @@ export default {
       totalQueueNumFirst: null
     };
   },
-  created() {
-    // this.myWebsocket();
-  },
   mounted() {
     this.i = 0;
     this.infomation();
@@ -295,7 +292,6 @@ export default {
         console.log(this.totalQueueNum, "totalQueueNum");
         if (this.i == 0) {
           this.totalQueueNumFirst = this.totalQueueNum;
-          console.log(this.totalQueueNumFirst, "totalQueuefIRST");
         }
         this.i++;
       });
@@ -307,7 +303,9 @@ export default {
       this.getSpellingArray();
       this.getNoSpellingArray();
       this.redDotNum = null;
-      this.totalQueueNumFirst = this.totalQueueNum;
+      this.totalQueueNum = null;
+      this.totalQueueNumFirst = null;
+      this.i = 0;
       clearInterval(this.timer);
       this.start();
     },
@@ -432,6 +430,10 @@ export default {
       }
     },
     handleClick() {
+      this.redDotNum = null;
+      this.totalQueueNum = null;
+      this.totalQueueNumFirst = null;
+      this.i = 0;
       if (this.activeName == "first") {
         this.getNoSpellingArray();
       } else {
@@ -453,13 +455,10 @@ export default {
         )
         .then(res => {
           this.tableData = res.data.data;
-          console.log(this.tableData);
           this.getSpanArr(this.tableData);
         });
     },
     onclick() {
-      console.log("我到了这里");
-      console.log(this.capacityNo);
       if (this.activeName == "first") {
         this.axios
           .post(
@@ -553,12 +552,24 @@ export default {
           this.$refs.mutiData.clearSelection();
           this.getNoSpellingArray();
           this.getSpellingArray();
+          this.redDotNum = null;
+          this.totalQueueNum = null;
+          this.totalQueueNumFirst = null;
+          this.i = 0;
+          clearInterval(this.timer);
+          this.start();
         } else {
           this.$message.error("请按顺序勾选");
           this.maplist = [];
           this.$refs.mutiData.clearSelection();
           this.getNoSpellingArray();
           this.getSpellingArray();
+          this.redDotNum = null;
+          this.totalQueueNum = null;
+          this.totalQueueNumFirst = null;
+          this.i = 0;
+          clearInterval(this.timer);
+          this.start();
         }
       });
     }

+ 252 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelAllReport.vue

@@ -0,0 +1,252 @@
+//钢材统计报表
+<template>
+  <div class="purchasFuelNewMonitor">
+    <div class="tableTop">
+      <el-form :inline="true" style="margin-top :5px">
+        <el-form-item>
+          <label class="el-form-item__label" style="width: auto;"
+            >订单时间:</label
+          >
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期时间"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期时间"
+          >
+          </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="exportData()"
+            ><i class="el-icon-download"></i>导出(Excel)</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">合计车数:</span>
+          <el-input
+            v-model="totalCapacity"
+            :disabled="true"
+            style="width: 100px;"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="table">
+      <!-- <mergeRowTable
+        ref="excelDom"
+        v-bind.sync="option"
+        :isHeigth="isHeigth"
+        :shiyHeigth="shiyHeigth"
+        :isKuang="isKuang"
+        @funs="funs"
+      >
+      </mergeRowTable> -->
+      <steelReport></steelReport>
+    </div>
+  </div>
+</template>
+
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+import steelReport from "./steelReportCom.vue";
+export default {
+  components: {
+    steelReport
+  },
+  data() {
+    return {
+      shiyHeigth: 140,
+      isHeigth: true,
+      pageSize: 100,
+      isKuang: false,
+      option: {
+        requestUrl: "",
+        comparison: "saleOrderMaterialId",
+        columnIndexs: [
+          0,
+          1,
+          2,
+          3,
+          4,
+          5,
+          6,
+          7,
+          8,
+          9,
+          17,
+          19,
+          20,
+          21,
+          22,
+          23,
+          24,
+          25
+        ],
+        isPagination: false
+      },
+      startTime: null,
+      endTime: null,
+      //合计净重
+      totalNumber: 0,
+      //合计车数
+      totalCapacity: 0,
+      tableTitle: "销售统计报表"
+    };
+  },
+  created() {
+    //初始化表头
+    if (getCookie("orgCode") == "chengyunshang") {
+      this.option.requestUrl =
+        "/api/v1/tms/getSaleSteelReport?apiId=492&startTime=null&endTime=null&carrierSsoId=" +
+        getCookie("userId") +
+        "&i=" +
+        new Date();
+    } else {
+      this.option.requestUrl =
+        "/api/v1/tms/getSaleSteelReport?apiId=492&startTime=null&endTime=null&carrierSsoId=" +
+        null +
+        "&i=" +
+        new Date();
+    }
+    //时间段初始化
+    const start = new Date(new Date(new Date().toLocaleDateString()).getTime());
+    var startTime = this.dataFormat(sjTime(start));
+    var endTime = this.dataFormat(sjTime(new Date()));
+    this.tableTitle = startTime + " 至 " + endTime;
+  },
+  methods: {
+    getRequestUrl() {
+      this.startTime = null;
+      this.endTime = null;
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.option.requestUrl =
+          "/api/v1/tms/getSaleSteelReport?apiId=492&startTime=null&endTime=null&carrierSsoId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
+      } else {
+        this.option.requestUrl =
+          "/api/v1/tms/getSaleSteelReport?apiId=492&startTime=null&endTime=null&carrierSsoId=" +
+          null +
+          "&i=" +
+          new Date();
+      }
+    },
+    refresh() {
+      this.getRequestUrl();
+    },
+    funs(res) {
+      let arr = [];
+      let arr1 = Array.from(res);
+      arr1.forEach(e => {
+        arr.push(e.group);
+      });
+      this.totalCapacity = Math.max(...arr) + 1;
+    },
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+        //修改报表名称
+        this.tableTitle =
+          this.dataFormat(startTime) + " 至 " + this.dataFormat(endTime);
+        //加上时间重置表头
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.option.requestUrl =
+            "/api/v1/tms/getSaleSteelReport?apiId=492&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
+        } else {
+          this.option.requestUrl =
+            "/api/v1/tms/getSaleSteelReport?apiId=492&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date();
+        }
+      } else {
+        if (this.startTime) {
+          startTime = sjTime(this.startTime);
+        } else if (this.endTime) {
+          endTime = sjTime(this.endTime);
+        }
+        //加上时间重置表头
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.option.requestUrl =
+            "/api/v1/tms/getSaleSteelReport?apiId=492&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
+        } else {
+          this.option.requestUrl =
+            "/api/v1/tms/getSaleSteelReport?apiId=492&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date();
+        }
+      }
+    },
+    //格式化日期
+    dataFormat(value) {
+      let date = new Date(value);
+      let y = date.getFullYear();
+      let MM = date.getMonth() + 1;
+      MM = MM < 10 ? "0" + MM : MM;
+      let d = date.getDate();
+      d = d < 10 ? "0" + d : d;
+      let h = date.getHours();
+      h = h < 10 ? "0" + h : h;
+      let m = date.getMinutes();
+      m = m < 10 ? "0" + m : m;
+      let s = date.getSeconds();
+      s = s < 10 ? "0" + s : s;
+      return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s;
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.purchasFuelNewMonitor {
+  .tableTop {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+}
+</style>

+ 497 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/steelReportCom.vue

@@ -0,0 +1,497 @@
+<template>
+  <el-table
+    :data="tableData"
+    :span-method="objectSpanMethod"
+    border
+    stripe
+    style="width: 100%; margin-top: 20px"
+    max-height="500px"
+    @cell-click="cellClik"
+  >
+    <el-table-column
+      width="50"
+      label="序号"
+      align="center"
+      fixed="left"
+      :resizable="false"
+    >
+      <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+    </el-table-column>
+    <el-table-column
+      prop="saleOrderNo"
+      label="销售订单号"
+      width="200px"
+      align="center"
+    >
+    </el-table-column>
+    <el-table-column
+      prop="consigneeName"
+      label="下单客户"
+      :width="flexColumnWidth('consigneeName', tableData, 'max')"
+      align="center"
+    >
+    </el-table-column>
+    <el-table-column
+      prop="carrierName"
+      label="承运商"
+      align="center"
+      width="150px"
+    >
+      <template slot-scope="scope">
+        <el-autocomplete
+          v-model="scope.row.carrierName"
+          :fetch-suggestions="querySearchCarrier"
+          placeholder="请输入承运商"
+          @select="handleSelectCarrier(scope.row, scope.$index)"
+          :disabled="scope.row.isCarrierShow != 1"
+        >
+          <el-button
+            @click="updateCarrier(row)"
+            type="primary"
+            v-if="scope.row.isCarrierShow == 1"
+            >提交</el-button
+          >
+        </el-autocomplete>
+      </template>
+    </el-table-column>
+    <el-table-column
+      prop="capacityNo"
+      label="车牌号"
+      align="center"
+      width="250px"
+    >
+      <template slot-scope="scope">
+        <el-autocomplete
+          style="width:120px"
+          v-model="scope.row.capacityNo"
+          :fetch-suggestions="querySearch"
+          placeholder="请输入车牌号"
+          @select="handleSelect(scope.row, scope.$index)"
+          :disabled="scope.row.isCapacityShow != 1"
+        ></el-autocomplete>
+        <el-button
+          @click="updateCapacity(row)"
+          type="primary"
+          v-if="scope.row.isCapacityShow == 1"
+          >提交</el-button
+        >
+      </template>
+    </el-table-column>
+    <el-table-column prop="capacityTel" label="司机电话" width="250px">
+      <template slot-scope="scope">
+        <el-input
+          style="width:120px"
+          v-model="scope.row.capacityTel"
+          placeholder="请输入电话号码"
+          :disabled="scope.row.isTelShow != 1"
+        ></el-input>
+        <el-button
+          @click="updateDriverTel(scope.row)"
+          type="primary"
+          v-if="scope.row.isTelShow == 1"
+          >提交</el-button
+        >
+      </template>
+    </el-table-column>
+    <el-table-column
+      prop="addressPlace"
+      label="收货地址"
+      :width="flexColumnWidth('addressPlace', tableData, 'max')"
+    >
+    </el-table-column>
+    <el-table-column prop="orderStatus" label="运单状态" align="center">
+    </el-table-column>
+    <el-table-column
+      prop="materialName"
+      label="物资名称"
+      align="center"
+      :width="flexColumnWidth('materialName', tableData, 'max')"
+    >
+    </el-table-column>
+    <el-table-column prop="materialSpe" label="物资规格" align="center">
+    </el-table-column>
+    <el-table-column prop="grossWeight" label="毛重"> </el-table-column>
+    <el-table-column
+      prop="grossWeightTime"
+      label="毛重时间"
+      :width="flexColumnWidth('grossWeightTime', tableData, 'max')"
+    >
+    </el-table-column>
+    <el-table-column prop="tareWeight" label="皮重"> </el-table-column>
+    <el-table-column
+      prop="tareWeightTime"
+      label="皮重时间"
+      :width="flexColumnWidth('tareWeightTime', tableData, 'max')"
+    >
+    </el-table-column>
+    <el-table-column prop="netWeight" label="净重"> </el-table-column>
+    <el-table-column
+      prop="entryGateTime"
+      label="进厂时间"
+      :width="flexColumnWidth('entryGateTime', tableData, 'max')"
+    >
+    </el-table-column>
+    <el-table-column
+      prop="loadTime"
+      label="装货时间"
+      :width="flexColumnWidth('loadTime', tableData, 'max')"
+    >
+    </el-table-column>
+    <el-table-column
+      prop="outGateTime"
+      label="出厂时间"
+      :width="flexColumnWidth('outGateTime', tableData, 'max')"
+    >
+    </el-table-column>
+    <el-table-column
+      prop="arrivalAddress"
+      label="抵达地址"
+      :width="flexColumnWidth('arrivalAddress', tableData, 'max')"
+    >
+    </el-table-column>
+    <el-table-column
+      prop="receiptAddress"
+      label="签收地址"
+      :width="flexColumnWidth('receiptAddress', tableData, 'max')"
+    >
+    </el-table-column>
+    <el-table-column prop="orderNo" label="运输订单号"> </el-table-column>
+    <el-table-column prop="saler" label="业务员"> </el-table-column>
+    <el-table-column prop="shipperName" label="发货单位"> </el-table-column>
+    <el-table-column prop="truckNo" label="车序号"> </el-table-column>
+    <el-table-column prop="consigneeTel" label="收货客户电话">
+    </el-table-column>
+    <el-table-column prop="isSelfMention" label="是否自提"> </el-table-column>
+    <el-table-column prop="saleOrderStatus" label="销售订单状态">
+    </el-table-column>
+    <el-table-column label="操作" fixed="right" width="200px">
+      <template slot-scope="scope">
+        <el-button type="text" size="small" @click="deleteEasEntryId(scope.row)"
+          >关闭分录</el-button
+        >
+      </template>
+    </el-table-column>
+  </el-table>
+</template>
+
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "steelReport",
+  data() {
+    return {
+      capacityList: [],
+      carrierList: [],
+      tableData: [],
+      spanArr: [],
+      pos: 0,
+      isCellClick: 0,
+      columnIndexs: [
+        0,
+        1,
+        2,
+        3,
+        4,
+        5,
+        6,
+        7,
+        15,
+        16,
+        17,
+        18,
+        19,
+        20,
+        21,
+        22,
+        23,
+        24,
+        25,
+        26
+      ]
+    };
+  },
+  mounted() {
+    this.getSteelReport();
+  },
+  methods: {
+    cellClik(row, column, cell, event) {
+      if (column.property == "capacityNo") {
+        this.$set(row, "isCapacityShow", 1);
+      }
+      if (column.property == "carrierName") {
+        this.$set(row, "isCarrierShow", 1);
+      }
+      if (column.property == "capacityTel") {
+        this.$set(row, "isTelShow", 1);
+      }
+      if (column.property == "capacityTel") {
+        this.$set(row, "isTelShow", 1);
+      }
+    },
+    //承运商弹出层
+    handleSelectCarrier(row, index, item) {
+      console.log(row);
+    },
+    //承运商边输边查
+    querySearchCarrier(queryString, cb) {
+      this.axios
+        .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+        .then(res => {
+          if (res.data.code == "200") {
+            var restaurants = res.data.data;
+            console.log(restaurants);
+            var results = queryString
+              ? restaurants.filter(this.createFilterCarrier(queryString))
+              : restaurants;
+            cb(results);
+          }
+        });
+    },
+    createFilterCarrier(queryString) {
+      return restaurants => {
+        return (
+          restaurants.value1.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以下是车牌号边输边查搜索
+    querySearch(queryString, cb) {
+      if (queryString.length > 3) {
+        this.axios
+          .post("/api/v1/uc/getCapacityByLike?index=" + queryString)
+          .then(res => {
+            if (res.data.code == "200") {
+              if (res.data.data.length == 0) {
+                this.$message.info("车牌号不存在");
+                return;
+              }
+              this.capacityList = [];
+              var restaurants = res.data.data;
+              this.capacityList = res.data.data;
+              var results = queryString
+                ? restaurants.filter(this.createFilter(queryString))
+                : restaurants;
+              // 调用 callback 返回建议列表的数据
+              cb(results);
+            }
+          });
+      }
+    },
+    createFilter(queryString) {
+      return restaurants => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //车牌号弹出层
+    handleSelect(row, index) {
+      this.capacityList.forEach(item => {
+        if (item.capacityNumber === row.capacityNo) {
+          row.newCapacityId = item.capacityId;
+        }
+      });
+    },
+    //更换车牌号接口
+    updateCapacitySure() {
+      let map = {
+        orderId: this.orderId,
+        saleOrderMaterialId: this.saleOrderMaterialId,
+        lineSequence: this.lineSequence,
+        capacityId: this.newCapacityId
+      };
+      this.axios
+        .post("/api/v1/ams/updateCapacityNumberInFactory", map)
+        .then(res => {
+          if (res.data.code == 200) {
+            this.$message.success("变更成功");
+            this.getSteelReport();
+          } else {
+            this.$message.success("变更失败,请联系管理员");
+            this.getSteelReport();
+          }
+        })
+        .catch(() => {
+          this.$message.success("变更失败,请联系管理员");
+          this.getSteelReport();
+        });
+    },
+    //修改司机电话号码
+    updateDriverTel(row) {
+      console.log(row.capacityTel);
+      this.axios
+        .post("/api/v1/uc/updateDriverTel", {
+          orderId: parseInt(row.orderId),
+          driverTel: row.capacityTel
+        })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("修改成功");
+            this.getSteelReport();
+          } else {
+            this.$message.error("修改失败");
+            this.getSteelReport();
+          }
+        })
+        .catch(() => {
+          this.$message.error("修改失败");
+          this.getSteelReport();
+        });
+    },
+    //关闭金蝶分录
+    deleteEasEntryId(row) {
+      let title = `确定关闭-${this.capacityNumber}-金蝶分录?`;
+      this.$confirm(title, {
+        confirmButtonText: "是",
+        cancelButtonText: "否",
+        center: true,
+        type: "warning"
+      })
+        .then(() => {
+          let map = row;
+          map.isCloseEas = Number(0);
+          map.saleOrderId = this.$route.params.saleOrderId;
+          this.axios
+            .post("/api/v1/ams/updateCarAddress", map)
+            .then(res => {
+              if (res.data.code == "200") {
+                this.$message.success("关闭成功");
+                this.getOrderList();
+              } else {
+                this.$message.error("关闭失败");
+                this.getOrderList();
+              }
+            })
+            .catch(() => {
+              this.$message.error("关闭失败");
+              this.getOrderList();
+            });
+        })
+        .catch(() => {
+          this.$message.info("取消删除");
+        });
+    },
+    //记录每一行的合并数
+    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;
+          }
+        }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.columnIndexs.indexOf(columnIndex) != -1) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
+    getSteelReport() {
+      let carrierSsoId = null;
+      if (getCookie("orgCode") == "chengyunshang") {
+        carrierSsoId = getCookie("userId");
+      }
+      this.axios
+        .post(
+          "/api/v1/tms/getSaleSteelReport?startTime=" +
+            null +
+            "&endTime=" +
+            null +
+            "&carrierSsoId=" +
+            carrierSsoId
+        )
+        .then(res => {
+          this.tableData = res.data.data;
+          this.getSpanArr(res.data.data);
+        });
+    },
+    flexColumnWidth(str, tableData, flag) {
+      // str为该列的字段名(传字符串);tableData为该表格的数据源(传变量);
+      // flag为可选值,可不传该参数,传参时可选'max'或'equal',默认为'max'
+      // flag为'max'则设置列宽适配该列中最长的内容,flag为'equal'则设置列宽适配该列中第一行内容的长度。
+      str = str + "";
+      let columnContent = "";
+      if (
+        !tableData ||
+        !tableData.length ||
+        tableData.length === 0 ||
+        tableData === undefined
+      ) {
+        return;
+      }
+      if (!str || !str.length || str.length === 0 || str === undefined) {
+        return;
+      }
+      if (flag === "equal") {
+        // 获取该列中第一个不为空的数据(内容)
+        for (let i = 0; i < tableData.length; i++) {
+          if (tableData[i][str].length > 0) {
+            columnContent = tableData[i][str] + "";
+            break;
+          }
+        }
+      } else {
+        // 获取该列中最长的数据(内容)
+        let index = 0;
+        for (let i = 0; i < tableData.length; i++) {
+          if (tableData[i][str] === null) {
+            // 当数据为空时跳过本次循环获取下一条数据长度
+            continue;
+          }
+          const now_temp = tableData[i][str] + "";
+          const max_temp = tableData[index][str] + "";
+          if (now_temp.length > max_temp.length) {
+            index = i;
+          }
+        }
+        columnContent = tableData[index][str] + "";
+      } // 以下分配的单位长度可根据实际需求进行调整
+      let flexWidth = 0;
+      if (columnContent != undefined) {
+        for (const char of columnContent) {
+          if ((char >= "A" && char <= "Z") || (char >= "a" && char <= "z")) {
+            // 如果是英文字符,为字符分配10个单位宽度
+            flexWidth += 10;
+          } else if (char >= "\u4e00" && char <= "\u9fa5") {
+            // 如果是中文字符,为字符分配16个单位宽度
+            flexWidth += 14;
+          } else {
+            // 其他种类字符,为字符分配10个单位宽度
+            flexWidth += 10;
+          }
+        }
+      }
+      if (flexWidth < 80) {
+        // 设置最小宽度
+        flexWidth = 80;
+      }
+      if (flexWidth > 500) {
+        // 设置最大宽度
+        flexWidth = 500;
+      }
+      return flexWidth + "px";
+    }
+  }
+};
+</script>

+ 180 - 56
src/views/statisticalReport/router/index.js

@@ -1,73 +1,197 @@
-import Vue from 'vue'
-import Router from 'vue-router'
+import Vue from "vue";
+import Router from "vue-router";
 
-import routerBefore from '@/config/routerBefore.js'
+import routerBefore from "@/config/routerBefore.js";
 
 // 主要
-import main from '@/components/main.vue'
+import main from "@/components/main.vue";
 // 系统配置管理
-import ShipDynamicTable from '../components/Ship_dynamic_table.vue'
-import purchaseAccessoriesMonitor from '../components/purchaseAccessoriesMonitor.vue'
-import purchasFuelOldMonitor from '../components/purchasFuelMonitor/purchasFuelOldMonitor.vue'
-import purchasFuelNewMonitor from '../components/purchasFuelMonitor/purchasFuelNewMonitor.vue'
-import sporadicReportEnterFactory from '../components/sporadicReport/sporadicReportEnterFactory.vue'
-import sporadicReportExFactory from '../components/sporadicReport/sporadicReportExFactory.vue'
-import saleChemicalCokeForm from '../components/salesLogisticsStatistics/saleChemicalCokeForm.vue'
-import saleCoproductForm from '../components/salesLogisticsStatistics/saleCoproductForm.vue'
-import saleSteelForm from '../components/salesLogisticsStatistics/saleSteelForm.vue'
-import transportationPerformance from '../components/salesLogisticsStatistics/transportationPerformance.vue'
-import purchaseChemicalMaterialsNew from '../components/purchaseChemicalMaterials/purchaseChemicalMaterialsNew.vue'
-import purchaseChemicalMaterialsOld from '../components/purchaseChemicalMaterials/purchaseChemicalMaterialsOld.vue'
-import purInwardReport from '../components/inwardReport/putInwardReport.vue'
-import inwardFactory from '../components/inwardReport/inwardFactory.vue'
-import getLoading from '../components/inwardReport/getLoading.vue'
-import getUnLoading from '../components/inwardReport/getUnLoading.vue'
-import purchaseMineral from '../components/purachaseMineral.vue'
-import inwardSporadicReport from '../components/sporadicReport/inwardSporadicReport.vue'
-import getInstall from '../components/inwardReport/getInstall.vue'
-import getCapacityByDefend from '../components/defendCapacity/getCapacityByDefend.vue'
-import inwardAssemble from '../components/inwardAssemble/inwardAssemble.vue'
-import loadCapacityDetail from '../components/loadCapacityDetail/loadCapacityDetail.vue'
-import allInwardReport from '../components/inwardReport/allInwardReport.vue'
-Vue.use(Router)
+import ShipDynamicTable from "../components/Ship_dynamic_table.vue";
+import purchaseAccessoriesMonitor from "../components/purchaseAccessoriesMonitor.vue";
+import purchasFuelOldMonitor from "../components/purchasFuelMonitor/purchasFuelOldMonitor.vue";
+import purchasFuelNewMonitor from "../components/purchasFuelMonitor/purchasFuelNewMonitor.vue";
+import sporadicReportEnterFactory from "../components/sporadicReport/sporadicReportEnterFactory.vue";
+import sporadicReportExFactory from "../components/sporadicReport/sporadicReportExFactory.vue";
+import saleChemicalCokeForm from "../components/salesLogisticsStatistics/saleChemicalCokeForm.vue";
+import saleCoproductForm from "../components/salesLogisticsStatistics/saleCoproductForm.vue";
+import saleSteelForm from "../components/salesLogisticsStatistics/saleSteelForm.vue";
+import transportationPerformance from "../components/salesLogisticsStatistics/transportationPerformance.vue";
+import purchaseChemicalMaterialsNew from "../components/purchaseChemicalMaterials/purchaseChemicalMaterialsNew.vue";
+import purchaseChemicalMaterialsOld from "../components/purchaseChemicalMaterials/purchaseChemicalMaterialsOld.vue";
+import purInwardReport from "../components/inwardReport/putInwardReport.vue";
+import inwardFactory from "../components/inwardReport/inwardFactory.vue";
+import getLoading from "../components/inwardReport/getLoading.vue";
+import getUnLoading from "../components/inwardReport/getUnLoading.vue";
+import purchaseMineral from "../components/purachaseMineral.vue";
+import inwardSporadicReport from "../components/sporadicReport/inwardSporadicReport.vue";
+import getInstall from "../components/inwardReport/getInstall.vue";
+import getCapacityByDefend from "../components/defendCapacity/getCapacityByDefend.vue";
+import inwardAssemble from "../components/inwardAssemble/inwardAssemble.vue";
+import loadCapacityDetail from "../components/loadCapacityDetail/loadCapacityDetail.vue";
+import allInwardReport from "../components/inwardReport/allInwardReport.vue";
+import saleSteelAllReport from "../components/salesLogisticsStatistics/saleSteelAllReport.vue";
+Vue.use(Router);
 
 const constantRouterMap = [
   {
-    path: '/',
-    name: 'main',
-    meta: {title: '首页', code: 'xtpzgl'},
+    path: "/",
+    name: "main",
+    meta: { title: "首页", code: "xtpzgl" },
     component: main,
-    redirect: {name: 'cargoResult'},
+    redirect: { name: "cargoResult" },
     children: [
-      {path: 'purchaseChemicalMaterialsNew', name: 'purchaseChemicalMaterialsNew', meta: {code: 'xtpzgl-yhgl'}, component: purchaseChemicalMaterialsNew},
-      {path: 'purchaseChemicalMaterialsOld', name: 'purchaseChemicalMaterialsOld', meta: {code: 'xtpzgl-yhgl'}, component: purchaseChemicalMaterialsOld},
-      {path: 'ShipDynamicTable', name: 'ShipDynamicTable', meta: {code: 'xtpzgl-yhgl'}, component: ShipDynamicTable},
-      {path: 'purchaseAccessoriesMonitor', name: 'purchaseAccessoriesMonitor', meta: {code: 'xtpzgl-yhgl'}, component: purchaseAccessoriesMonitor},
-      {path: 'purchasFuelOldMonitor', name: 'purchasFuelOldMonitor', meta: {code: 'xtpzgl-yhgl'}, component: purchasFuelOldMonitor},
-      {path: 'purchasFuelNewMonitor', name: 'purchasFuelNewMonitor', meta: {code: 'xtpzgl-yhgl'}, component: purchasFuelNewMonitor},
-      {path: 'sporadicReportEnterFactory',name:'sporadicReportEnterFactory',meta:{code:'xtpzgl-yhgl'},component:sporadicReportEnterFactory},
-      {path: 'sporadicReportExFactory',name:'sporadicReportExFactory',meta:{code:'xtpzgl-yhgl'},component:sporadicReportExFactory},
-      {path: 'saleChemicalCokeForm', name: 'saleChemicalCokeForm', meta: {code: 'xtpzgl-yhgl'}, component: saleChemicalCokeForm},
-      {path: 'saleCoproductForm', name: 'saleCoproductForm', meta: {code: 'xtpzgl-yhgl'}, component: saleCoproductForm},
-      {path: 'saleSteelForm', name: 'saleSteelForm', meta: {code: 'xtpzgl-yhgl'}, component: saleSteelForm},
-      {path: 'transportationPerformance', name: 'transportationPerformance', meta: {code: 'xtpzgl-yhgl'}, component: transportationPerformance},
-      {path: 'purInwardReport', name: 'purInwardReport', meta: {code: 'xtpzgl-yhgl'}, component: purInwardReport},
-      {path: 'inwardFactory', name: 'inwardFactory', meta: {code: 'xtpzgl-yhgl'}, component: inwardFactory},
-      {path: 'getLoading', name: 'getLoading', meta: {code: 'xtpzgl-yhgl'}, component: getLoading},
-      {path: 'getUnLoading', name: 'getUnLoading', meta: {code: 'xtpzgl-yhgl'}, component: getUnLoading},
-      {path: 'purchaseMineral', name: 'purchaseMineral', meta: {code: 'xtpzgl-yhgl'}, component: purchaseMineral},
-      {path: 'inwardSporadicReport', name: 'inwardSporadicReport', meta: {code: 'xtpzgl-yhgl'}, component: inwardSporadicReport},
-      {path: 'getInstall', name: 'getInstall', meta: {code: 'xtpzgl-yhgl'}, component: getInstall},
-      {path: 'getCapacityByDefend', name: 'getCapacityByDefend', meta: {code: 'xtpzgl-yhgl'}, component: getCapacityByDefend},
-      {path: 'inwardAssemble', name: 'inwardAssemble', meta: {code: 'xtpzgl-yhgl'}, component: inwardAssemble},
-      {path: 'loadCapacityDetail', name: 'loadCapacityDetail', meta: {code: 'xtpzgl-yhgl'}, component: loadCapacityDetail},
-      {path: 'allInwardReport', name: 'allInwardReport', meta: {code: 'xtpzgl-yhgl'}, component: allInwardReport},
+      {
+        path: "purchaseChemicalMaterialsNew",
+        name: "purchaseChemicalMaterialsNew",
+        meta: { code: "xtpzgl-yhgl" },
+        component: purchaseChemicalMaterialsNew
+      },
+      {
+        path: "purchaseChemicalMaterialsOld",
+        name: "purchaseChemicalMaterialsOld",
+        meta: { code: "xtpzgl-yhgl" },
+        component: purchaseChemicalMaterialsOld
+      },
+      {
+        path: "ShipDynamicTable",
+        name: "ShipDynamicTable",
+        meta: { code: "xtpzgl-yhgl" },
+        component: ShipDynamicTable
+      },
+      {
+        path: "purchaseAccessoriesMonitor",
+        name: "purchaseAccessoriesMonitor",
+        meta: { code: "xtpzgl-yhgl" },
+        component: purchaseAccessoriesMonitor
+      },
+      {
+        path: "purchasFuelOldMonitor",
+        name: "purchasFuelOldMonitor",
+        meta: { code: "xtpzgl-yhgl" },
+        component: purchasFuelOldMonitor
+      },
+      {
+        path: "purchasFuelNewMonitor",
+        name: "purchasFuelNewMonitor",
+        meta: { code: "xtpzgl-yhgl" },
+        component: purchasFuelNewMonitor
+      },
+      {
+        path: "sporadicReportEnterFactory",
+        name: "sporadicReportEnterFactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicReportEnterFactory
+      },
+      {
+        path: "sporadicReportExFactory",
+        name: "sporadicReportExFactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: sporadicReportExFactory
+      },
+      {
+        path: "saleChemicalCokeForm",
+        name: "saleChemicalCokeForm",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleChemicalCokeForm
+      },
+      {
+        path: "saleCoproductForm",
+        name: "saleCoproductForm",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleCoproductForm
+      },
+      {
+        path: "saleSteelForm",
+        name: "saleSteelForm",
+        meta: { code: "xtpzgl-yhgl" },
+        component: saleSteelForm
+      },
+      {
+        path: "transportationPerformance",
+        name: "transportationPerformance",
+        meta: { code: "xtpzgl-yhgl" },
+        component: transportationPerformance
+      },
+      {
+        path: "purInwardReport",
+        name: "purInwardReport",
+        meta: { code: "xtpzgl-yhgl" },
+        component: purInwardReport
+      },
+      {
+        path: "inwardFactory",
+        name: "inwardFactory",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inwardFactory
+      },
+      {
+        path: "getLoading",
+        name: "getLoading",
+        meta: { code: "xtpzgl-yhgl" },
+        component: getLoading
+      },
+      {
+        path: "getUnLoading",
+        name: "getUnLoading",
+        meta: { code: "xtpzgl-yhgl" },
+        component: getUnLoading
+      },
+      {
+        path: "purchaseMineral",
+        name: "purchaseMineral",
+        meta: { code: "xtpzgl-yhgl" },
+        component: purchaseMineral
+      },
+      {
+        path: "inwardSporadicReport",
+        name: "inwardSporadicReport",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inwardSporadicReport
+      },
+      {
+        path: "getInstall",
+        name: "getInstall",
+        meta: { code: "xtpzgl-yhgl" },
+        component: getInstall
+      },
+      {
+        path: "getCapacityByDefend",
+        name: "getCapacityByDefend",
+        meta: { code: "xtpzgl-yhgl" },
+        component: getCapacityByDefend
+      },
+      {
+        path: "inwardAssemble",
+        name: "inwardAssemble",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inwardAssemble
+      },
+      {
+        path: "loadCapacityDetail",
+        name: "loadCapacityDetail",
+        meta: { code: "xtpzgl-yhgl" },
+        component: loadCapacityDetail
+      },
+      {
+        path: "allInwardReport",
+        name: "allInwardReport",
+        meta: { code: "xtpzgl-yhgl" },
+        component: allInwardReport
+      },
+      {
+        path: "saleSteelAllReport",
+        name: "saleSteelAllReport",
+        meta: {
+          code: "xtpzgl-yhgl"
+        },
+        component: saleSteelAllReport
+      }
     ]
   }
 ];
 const router = new Router({
   routes: constantRouterMap
-})
+});
 //  before
 routerBefore(router, constantRouterMap);