luobang 2 лет назад
Родитель
Сommit
63c7c10f6e

+ 1 - 1
build/utils.js

@@ -17,7 +17,7 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 // let devModules = ["index", "appoint", "statisticalReport", "WMS","TMS"];
 // let devModules = ["index", "TMS", "appoint", "WMS", "queue"];
-let devModules = ["all"];
+let devModules = ["index", "statisticalReport", "inward"];
 
 if (pathSrc.indexOf("node_modules") > -1) {
   devModules = require("../../../cors.js").devModules;

+ 2 - 2
config/index.js

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

+ 75 - 1
src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue

@@ -274,6 +274,58 @@
               </div>
             </div>
           </el-tab-pane>
+          <el-tab-pane label="车辆手动进厂" name="sixth">
+            <div class="admin2">
+              <div class="carrier from">
+                <el-form
+                  :inline="true"
+                  class="demo-form-inline"
+                  label-width="80px"
+                >
+                  <el-form-item label="车牌号:">
+                    <el-autocomplete
+                      class="inline-input"
+                      v-model="capacityName"
+                      :fetch-suggestions="querySearchCapacity"
+                      placeholder="车牌号"
+                      :trigger-on-focus="false"
+                      @select="handleSelectCapacity"
+                    >
+                      <template slot-scope="{ item }">
+                        <div class="name">{{ item.capacityNumber }}</div>
+                      </template>
+                    </el-autocomplete>
+                  </el-form-item>
+                </el-form>
+              </div>
+              <div class="poundNo from">
+                <span class="text">运输订单号:</span>
+                <el-input v-model="orderNumber" disabled></el-input>
+              </div>
+              <span class="text">进厂门岗:</span>
+              <el-select
+                v-model="enFactoryGatepost"
+                placeholder="请选择"
+                @change="onchangeGatepost(enFactoryGatepost)"
+              >
+                <el-option
+                  v-for="item in gatePostList"
+                  :key="item.gatepostId"
+                  :label="item.gatepostName"
+                  :value="item.gatepostName"
+                >
+                </el-option>
+              </el-select>
+              <div class="button_box">
+                <el-button
+                  type="primary"
+                  @click="enFactoryResultByPDA"
+                  :disabled="disabled"
+                  >确认</el-button
+                >
+              </div>
+            </div>
+          </el-tab-pane>
         </el-tabs>
       </div>
     </template>
@@ -308,7 +360,10 @@ export default {
       switchValue: true,
       truckCalFirstNum: null,
       truckCalSecondNum: null,
-      lineQuence: null
+      lineQuence: null,
+      gatePostList: [],
+      enFactoryGatepost: null,
+      gatePostId: null
     };
   },
   created() {
@@ -319,6 +374,21 @@ export default {
     this.information();
   },
   methods: {
+    onchangeGatepost(value) {
+      console.log(value);
+      this.gatePostList.forEach(e => {
+        if (e.gatepostName == value) {
+          this.gatePostId = e.gatePostId;
+        }
+      });
+    },
+    enFactoryResultByPDA() {
+      let map = {
+        orderNumber: this.orderNumber + " ",
+        gatepostId: this.gatePostId
+      };
+      this.axios.post("");
+    },
     allowEnfactoryClick() {},
     queueClick() {
       this.axios
@@ -431,6 +501,10 @@ export default {
         this.truckCalFirstList = res.data;
         this.truckCalSecondList = res.data;
       });
+      this.axios.get("/api/v1/uc/getAllGatepost").then(res => {
+        console.log(res);
+        this.gatePostList = res.data;
+      });
     },
     onClickConfirm() {
       this.poundNo = "jlbl" + toDateNo(new Date());

+ 14 - 7
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -945,7 +945,8 @@ export default {
       //是否忽视收货客户电话字段
       ignoreSaleOrderConsigneeTel: 0,
       restaurants: [],
-      saleAreaId: null
+      saleAreaId: null,
+      isNiTui: 0
     };
   },
   created() {
@@ -1448,6 +1449,7 @@ export default {
       ).then(() => {
         this.creatArtSingle(singleArr);
       });
+      this.isNiTui = 0;
     },
     async creatArtSingle(singleArr) {
       let i = 0;
@@ -1572,6 +1574,7 @@ export default {
       } else {
         this.addMaterialToSaleOrder();
       }
+      this.isNiTui = 0;
     },
     //添加物资到订单
     addMaterialToSaleOrder() {
@@ -1850,12 +1853,14 @@ export default {
     //收货地址弹出层
     handleSelect1(item) {
       console.log(item);
-      this.province = item.province;
-      this.city = item.district;
-      this.county = item.town;
-      this.place1 = item.place;
-      this.addressId = item.shipperAddressId;
-      this.place = item.place;
+      if (this.isNiTui == 1) {
+        this.province = item.province;
+        this.city = item.district;
+        this.county = item.town;
+        this.place1 = item.place;
+        this.addressId = item.shipperAddressId;
+        this.place = item.place;
+      }
     },
     //以下是收货地址边输边查搜索
     querySearch1(queryString, cb) {
@@ -1868,6 +1873,7 @@ export default {
               queryString
           )
           .then(res => {
+            this.isNiTui = 0;
             if (res.data.code == "200") {
               var restaurants = res.data.data;
               var results = queryString
@@ -1881,6 +1887,7 @@ export default {
         this.axios
           .post("/api/v1/uc/getPlaceAndAddress?index=" + queryString)
           .then(res => {
+            this.isNiTui = 1;
             if (res.data.code == "200") {
               console.log(res.data.data);
               var restaurants = res.data.data;

+ 195 - 31
src/views/inward/components/inwardSettlement/detailOrder.vue

@@ -66,41 +66,27 @@
         <el-button type="primary" class="btn" @click="onclick">
           <i class="el-icon-search"></i>
         </el-button>
-        <el-button type="primary" @click="exportData()"
+        <el-button type="primary" @click="exportAllExcel"
           ><i class="el-icon-download"></i>Excel</el-button
         >
-        <!-- <span style="margin-left: 1rem;">合计净重:</span>
-        <el-input
-          v-model="totalNetWeight"
-          :disabled="true"
-          style="width: 120px;"
-        ></el-input>
-        <span style="margin-left: 1rem;">合计金额:</span>
-        <el-input
-          v-model="totalMoney"
-          :disabled="true"
-          style="width: 100px;"
-        ></el-input> -->
       </el-form>
     </div>
     <div class="table">
       <el-tabs v-model="activeName" tab-click="handClick">
         <!-- 未结算 -->
         <el-tab-pane label="未结算" name="first">
-          <div class="table">
-            <dilTable
-              v-bind.sync="options1"
-              ref="excelDom"
-              @func="func"
-            ></dilTable>
-          </div>
+          <dilTable
+            v-bind.sync="options1"
+            ref="excelDom"
+            @func="func"
+          ></dilTable>
         </el-tab-pane>
         <!-- 已结算 -->
         <el-tab-pane label="已结算" name="second">
-          <dilTable v-bind.sync="options2"> </dilTable>
+          <dilTable v-bind.sync="options2" @func="func2"> </dilTable>
         </el-tab-pane>
         <el-tab-pane label="未生成详单" name="third">
-          <dilTable v-bind.sync="options3"> </dilTable>
+          <dilTable v-bind.sync="options3" @func="func3"> </dilTable>
         </el-tab-pane>
       </el-tabs>
     </div>
@@ -190,8 +176,6 @@ export default {
       newAddress: null,
       //新单价Id
       priceId: null,
-      //是否打开运输单价的模态框
-      addressDrawer: false,
       //运输单价的表格
       Address: {
         requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
@@ -201,7 +185,11 @@ export default {
       //缓存当前选中的运输单价
       priceMap: {},
       formLabelWidth: "125px",
-      tableTitle: "内转计重详单"
+      tableTitle: "内转计重详单",
+      exportAllList: [],
+      noSettleDetailsColumn: [],
+      settleDetailsColumn: [],
+      noDetailsColumn: []
     };
   },
   created() {
@@ -211,18 +199,188 @@ export default {
   },
   methods: {
     func(res) {
-      console.log(res.list);
+      this.noSettleDetailsColumn = res.columnData;
       var totalWeight = 0;
       var totalAllMoney = 0;
       res.list.forEach(e => {
-        console.log(e.resultNetWeight);
         totalWeight = totalWeight + e.resultNetWeight;
         totalAllMoney = totalAllMoney + e.detailsAmount;
-        console.log(e.detailsAmount);
       });
       this.totalNetWeight = totalWeight.toFixed(2) + "t";
       this.totalMoney = totalAllMoney.toFixed(2) + "元";
     },
+    func2(res) {
+      this.settleDetailsColumn = res.columnData;
+    },
+    func3(res) {
+      this.noDetailsColumn = res.columnData;
+    },
+    exportAllExcel() {
+      let startTime = null;
+      let endTime = null;
+      let orgCode = null;
+      let materialTypeNames = null;
+      let transRangeValues = null;
+      let shipperNames = null;
+      let capacityNo = null;
+      let carrierSsoId = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      if (getCookie("orgCode") == "chengyunshang") {
+        carrierSsoId = getCookie("userId");
+      }
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        orgCode = null;
+      } else {
+        orgCode = getCookie("orgCode");
+      }
+      if (this.screen == "车牌号") {
+        capacityNo = this.input;
+      }
+      if (this.screen == "承运起止范围") {
+        transRangeValues = this.input;
+      }
+      if (this.screen == "货物名称") {
+        materialTypeNames = this.input;
+      }
+      if (this.screen == "用车单位") {
+        shipperNames = this.input;
+      }
+      if (this.screen1 == "车牌号") {
+        capacityNo = this.input1;
+      }
+      if (this.screen1 == "承运起止范围") {
+        transRangeValues = this.input1;
+      }
+      if (this.screen1 == "货物名称") {
+        materialTypeNames = this.input1;
+      }
+      if (this.screen1 == "用车单位") {
+        shipperNames = this.input1;
+      }
+      if (this.activeName == "first") {
+        this.tableTitle = "未结算计费详单";
+        this.axios
+          .post(
+            "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&shipperNames=" +
+              shipperNames +
+              "&materialTypeNames=" +
+              materialTypeNames +
+              "&transRangeValues=" +
+              transRangeValues +
+              "&capacityNo=" +
+              capacityNo +
+              "&i" +
+              new Date() +
+              "&isPage=yes"
+          )
+          .then(res => {
+            console.log(res.data.data);
+            this.exportAllList = res.data.data;
+            this.exportAllReportToExcel(
+              this.tableTitle,
+              this.exportAllList,
+              this.noSettleDetailsColumn
+            );
+          });
+      } else if (this.activeName == "second") {
+        this.tableTitle = "已结算计费详单";
+        this.axios
+          .post(
+            "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&shipperNames=" +
+              shipperNames +
+              "&materialTypeNames=" +
+              materialTypeNames +
+              "&transRangeValues=" +
+              transRangeValues +
+              "&capacityNo=" +
+              capacityNo +
+              "&i" +
+              new Date() +
+              "&isPage=yes" +
+              "&orgCode=" +
+              orgCode
+          )
+          .then(res => {
+            this.exportAllList = res.data.data;
+            this.exportAllReportToExcel(
+              this.tableTitle,
+              this.exportAllList,
+              this.settleDetailsColumn
+            );
+          });
+      } else if (this.activeName == "third") {
+        this.tableTitle = "未生成计费详单数据";
+        this.axios
+          .post(
+            "/api/v1/bms/getNoInwardDetails?apiId=490" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&shipperNames=" +
+              shipperNames +
+              "&materialTypeNames=" +
+              materialTypeNames +
+              "&transRangeValues=" +
+              transRangeValues +
+              "&capacityNo=" +
+              capacityNo +
+              "&i" +
+              new Date() +
+              "&orgCode=" +
+              orgCode
+          )
+          .then(res => {
+            this.exportAllList = res.data.data;
+            this.exportAllReportToExcel(
+              this.tableTitle,
+              this.exportAllList,
+              this.noDetailsColumn
+            );
+          });
+      }
+    },
+    //导出excel
+    exportAllReportToExcel(tableTitle, dataArr, columnData) {
+      var title = tableTitle;
+      let tHeader = [];
+      let filterVal = [];
+      columnData.forEach(e1 => {
+        if (tHeader.indexOf(e1.label) === -1) {
+          tHeader.push(e1.label);
+        }
+        if (filterVal.indexOf(e1.prop) === -1) {
+          filterVal.push(e1.prop);
+        }
+      });
+      //导出为excel
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        // let list = this.$refs.excelDom.dataTabel;
+        let data = dataArr.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+      });
+    },
     //未结算数据
     options1GetRequestUrl() {
       if (getCookie("orgCode") == "chengyunshang") {
@@ -344,7 +502,9 @@ export default {
         "&capacityNo=" +
         capacityNo +
         "&i" +
-        new Date();
+        new Date() +
+        "&orgCode=" +
+        orgCode;
       this.options2.requestUrl =
         "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
         "&startTime=" +
@@ -360,7 +520,9 @@ export default {
         "&capacityNo=" +
         capacityNo +
         "&i" +
-        new Date();
+        new Date() +
+        "&orgCode=" +
+        orgCode;
       this.options3.requestUrl =
         "/api/v1/bms/getNoInwardDetails?apiId=490" +
         "&startTime=" +
@@ -376,7 +538,9 @@ export default {
         "&capacityNo=" +
         capacityNo +
         "&i" +
-        new Date();
+        new Date() +
+        "&orgCode=" +
+        orgCode;
     },
     //运输订单点击浏览的事件
     select() {

+ 17 - 18
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -330,24 +330,23 @@ export default {
       return row.ROW_ID;
     },
     selectInit(row) {
-      return true;
-      // if (this.maplist.length == 0) {
-      //   if (row.ROW_ID == 1) {
-      //     return true;
-      //   } else {
-      //     return false;
-      //   }
-      // } else {
-      //   if (
-      //     this.maplist.some(e => {
-      //       return e.ROW_ID == row.ROW_ID || e.ROW_ID + 1 == row.ROW_ID;
-      //     })
-      //   ) {
-      //     return true;
-      //   } else {
-      //     return false;
-      //   }
-      // }
+      if (this.maplist.length == 0) {
+        if (row.ROW_ID == 1) {
+          return true;
+        } else {
+          return false;
+        }
+      } else {
+        if (
+          this.maplist.some(e => {
+            return e.ROW_ID == row.ROW_ID || e.ROW_ID + 1 == row.ROW_ID;
+          })
+        ) {
+          return true;
+        } else {
+          return false;
+        }
+      }
     },
     rowDbClick(row) {
       this.materialList = [];

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

@@ -40,10 +40,6 @@
                   @click="priceValueUpdate(scope.row)"
                   >修改详单地址</el-button
                 >
-                <!-- <el-button type="text" size="mini" @click="getclick(scope)">查看</el-button> -->
-                <el-button type="text" size="mini" @click="addDamage(scope.row)"
-                  >增加途损</el-button
-                >
               </template>
             </el-table-column>
           </dilTable>

+ 112 - 107
src/views/statisticalReport/components/Ship_dynamic_table.vue

@@ -18,27 +18,6 @@
         </el-button>
       </div>
       <table-item :tableData="tableData" :col="col" id="pdfDom"> </table-item>
-      <table
-        border="0"
-        cellpadding="10"
-        cellspacing="0"
-        style="
-          margin: auto;
-          font-size: 21px;
-          font-family: FangSong;
-          line-height: 50px;
-        "
-
-        width="100%"
-        class="tablePart0"
-      >
-        <tr>
-          <!-- <td>{{stockString}}</td> -->
-          <td>
-            <span v-for="item in stockStringArr" :class="item.class" :key="item.value">{{item.value}}</span>
-          </td>
-        </tr>
-      </table>
     </div>
   </div>
 </template>
@@ -47,7 +26,7 @@ import tableItem from "./tableItem";
 export default {
   name: "TableView",
   components: {
-    tableItem,
+    tableItem
   },
   data() {
     return {
@@ -56,120 +35,120 @@ export default {
       col: [
         {
           prop: "materialType",
-          label: "矿种",
+          label: "矿种"
         },
         {
           prop: "pm",
-          label: "品名",
+          label: "品名"
         },
         {
           prop: "portName",
-          label: "港口名称",
+          label: "港口名称"
         },
         {
           prop: "tonnage",
-          label: "下游港口吨位",
+          label: "下游港口吨位"
         },
         {
           prop: "tonnage1",
-          label: "二层船吨位",
+          label: "二层船吨位"
         },
         {
           label: "未到闸船舶",
           children: [
             {
               prop: "capacity1",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber1",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue1",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime1",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "等闸船舶",
           children: [
             {
               prop: "capacity2",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber2",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue2",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime2",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "已过闸船舶",
           children: [
             {
               prop: "capacity3",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber3",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue3",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime3",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "到港待卸船舶",
           children: [
             {
               prop: "capacity4",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber4",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue4",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime4",
-              label: "离港时间",
+              label: "离港时间"
             },
             {
               prop: "dgsj",
-              label: "到港时间",
-            },
-          ],
-        },
+              label: "到港时间"
+            }
+          ]
+        }
       ],
       // 表格数据
 
       tableData: [],
       input: "",
       //万州港库存信息
-      stockString:null,
-      stockStringArr:[]
+      stockString: null,
+      stockStringArr: []
     };
   },
   created() {},
@@ -182,7 +161,7 @@ export default {
     onclick() {
       this.axios
         .post("/api/v1/tms/selectAllShipDynamaics?con=" + this.input)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             this.tableData = res.data.data;
             console.log("aaad" + res.data.data);
@@ -192,70 +171,96 @@ export default {
         });
     },
     initialization() {
-      this.axios.post("/api/v1/tms/selectAllShipDynamaics").then((res) => {
+      this.axios.post("/api/v1/tms/selectAllShipDynamaics").then(res => {
         if (res.data.code == "200") {
           this.tableData = res.data.data;
           console.log(this.tableData);
         } else {
           this.$message({
             type: "warning",
-            message: res.data.data,
+            message: res.data.data
           });
         }
       });
     },
-    getStockString(){
-      let that=this;
-      this.axios.post("/api/v1/wmsh/getLoadPortStockList?apiId=158&i=").then((res)=>{
-        console.log(res);
-        if(res.status=="200"){
-          let resultActualInstallations = 0;
-          res.data.data.list.forEach((e) => {
-            resultActualInstallations = resultActualInstallations + e.gmTonnage;
-          }); 
+    getStockString() {
+      let that = this;
+      this.axios
+        .post("/api/v1/wmsh/getLoadPortStockList?apiId=158&i=")
+        .then(res => {
+          console.log(res);
+          if (res.status == "200") {
+            let resultActualInstallations = 0;
+            res.data.data.list.forEach(e => {
+              resultActualInstallations =
+                resultActualInstallations + e.gmTonnage;
+            });
 
-          this.stockString +='万港库存'+ resultActualInstallations.toFixed(2) + "吨:";
-          this.stockStringArr.push({
-            class:"normal",
-            value:'万港库存'+ resultActualInstallations.toFixed(2) + "吨:"
-          });
+            this.stockString +=
+              "万港库存" + resultActualInstallations.toFixed(2) + "吨:";
+            this.stockStringArr.push({
+              class: "normal",
+              value: "万港库存" + resultActualInstallations.toFixed(2) + "吨:"
+            });
 
-          let materialName=res.data.data.list[0].materialName;
-          this.stockStringArr.push({
-            class:"black",
-            value:materialName+res.data.data.list[0].totalTonnage+"吨:"
-          })
-          this.stockString+=(materialName+res.data.data.list[0].totalTonnage+"吨 ");
+            let materialName = res.data.data.list[0].materialName;
+            this.stockStringArr.push({
+              class: "black",
+              value: materialName + res.data.data.list[0].totalTonnage + "吨:"
+            });
+            this.stockString +=
+              materialName + res.data.data.list[0].totalTonnage + "吨 ";
 
-          res.data.data.list.forEach((e) => {
-            if(e.materialName==materialName){
-              this.stockString+=(" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 ");
-               this.stockStringArr.push({
-                  class:"normal",
-                  value:" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 "
+            res.data.data.list.forEach(e => {
+              if (e.materialName == materialName) {
+                this.stockString +=
+                  " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 ";
+                this.stockStringArr.push({
+                  class: "normal",
+                  value:
+                    " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 "
                 });
-            }else{
-              materialName=e.materialName;
-              this.stockString+=(materialName+res.data.data.list[0].totalTonnage+"吨 ");
-              this.stockString+=(";"+materialName+e.totalTonnage+ "吨:"+" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 ");
-               this.stockStringArr.push({
-                class:"black",
-                value:";"+materialName+e.totalTonnage+ "吨:"
-              })
-              this.stockString+=(";"+materialName+e.totalTonnage+ "吨:"+" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 ");
-               this.stockStringArr.push({
-                class:"normal",
-                value:" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 "
-              })
-            }
-          });
-          console.log("arr:",this.stockStringArr);
-        }else{
-
-        }
-      });
+              } else {
+                materialName = e.materialName;
+                this.stockString +=
+                  materialName + res.data.data.list[0].totalTonnage + "吨 ";
+                this.stockString +=
+                  ";" +
+                  materialName +
+                  e.totalTonnage +
+                  "吨:" +
+                  " “" +
+                  e.resultForeignShipName +
+                  "”" +
+                  e.gmTonnage +
+                  "吨 ";
+                this.stockStringArr.push({
+                  class: "black",
+                  value: ";" + materialName + e.totalTonnage + "吨:"
+                });
+                this.stockString +=
+                  ";" +
+                  materialName +
+                  e.totalTonnage +
+                  "吨:" +
+                  " “" +
+                  e.resultForeignShipName +
+                  "”" +
+                  e.gmTonnage +
+                  "吨 ";
+                this.stockStringArr.push({
+                  class: "normal",
+                  value:
+                    " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 "
+                });
+              }
+            });
+            console.log("arr:", this.stockStringArr);
+          } else {
+          }
+        });
     }
-  },
+  }
 };
 </script>
 
@@ -276,8 +281,8 @@ export default {
     font-size: 20px;
     font-weight: 700;
   }
-  .black{
-      font-weight: 1000;
+  .black {
+    font-weight: 1000;
   }
 }
 </style>

+ 113 - 0
src/views/statisticalReport/components/tableItem.vue

@@ -28,6 +28,16 @@
           <span class="empty-desc">暂无数据</span>
         </div>
       </template>
+      <div slot="append">
+        <div class="appendSlot">
+          <span
+            v-for="item in stockStringArr"
+            :class="item.class"
+            :key="item.value"
+            >{{ item.value }}</span
+          >
+        </div>
+      </div>
     </el-table>
   </div>
 </template>
@@ -70,7 +80,92 @@ export default {
       default: false // 默认不展示
     }
   },
+  data() {
+    return {
+      stockString: null,
+      stockStringArr: []
+    };
+  },
+  mounted() {
+    this.getStockString();
+  },
   methods: {
+    getStockString() {
+      let that = this;
+      this.axios
+        .post("/api/v1/wmsh/getLoadPortStockList?apiId=158&i=")
+        .then(res => {
+          console.log(res);
+          if (res.status == "200") {
+            let resultActualInstallations = 0;
+            res.data.data.list.forEach(e => {
+              resultActualInstallations =
+                resultActualInstallations + e.gmTonnage;
+            });
+
+            this.stockString +=
+              "万港库存" + resultActualInstallations.toFixed(2) + "吨:";
+            this.stockStringArr.push({
+              class: "normalFirst",
+              value: "万港库存" + resultActualInstallations.toFixed(2) + "吨:"
+            });
+
+            let materialName = res.data.data.list[0].materialName;
+            this.stockStringArr.push({
+              class: "black",
+              value: materialName + res.data.data.list[0].totalTonnage + "吨:"
+            });
+            this.stockString +=
+              materialName + res.data.data.list[0].totalTonnage + "吨 ";
+
+            res.data.data.list.forEach(e => {
+              if (e.materialName == materialName) {
+                this.stockString +=
+                  " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 ";
+                this.stockStringArr.push({
+                  class: "normal",
+                  value:
+                    " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 "
+                });
+              } else {
+                materialName = e.materialName;
+                this.stockString +=
+                  materialName + res.data.data.list[0].totalTonnage + "吨 ";
+                this.stockString +=
+                  ";" +
+                  materialName +
+                  e.totalTonnage +
+                  "吨:" +
+                  " “" +
+                  e.resultForeignShipName +
+                  "”" +
+                  e.gmTonnage +
+                  "吨 ";
+                this.stockStringArr.push({
+                  class: "black",
+                  value: ";" + materialName + e.totalTonnage + "吨:"
+                });
+                this.stockString +=
+                  ";" +
+                  materialName +
+                  e.totalTonnage +
+                  "吨:" +
+                  " “" +
+                  e.resultForeignShipName +
+                  "”" +
+                  e.gmTonnage +
+                  "吨 ";
+                this.stockStringArr.push({
+                  class: "normal",
+                  value:
+                    " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 "
+                });
+              }
+            });
+            console.log("arr:", this.stockStringArr);
+          }
+        });
+    },
     headerCellStyle({ row, column, rowIndex, columnIndex }) {
       let columnIndexList1 = [5];
       let columnIndexList2 = [6];
@@ -180,3 +275,21 @@ export default {
   padding: 0.4375rem 0 !important;
 }
 </style>
+<style lang="scss" scoped>
+.el-table {
+  .appendSlot {
+    margin-left: 10%;
+    font-size: 18px;
+    line-height: 20px;
+    .normalFirst {
+      margin-left: 42px;
+    }
+    // display: flex;
+    // // align-items: center;
+    // // justify-content: center;
+    .black {
+      font-weight: 700;
+    }
+  }
+}
+</style>