Bladeren bron

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

zyf 2 jaren geleden
bovenliggende
commit
f53e0598bd

+ 0 - 1
build/utils.js

@@ -22,7 +22,6 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 let devModules = ["all"];
 //let devModules = ["BMS","index","sale","appoint","AMS","queue","QMS","RMS"];
 
-
 if (pathSrc.indexOf("node_modules") > -1) {
   devModules = require("../../../cors.js").devModules;
 }

+ 1 - 1
config/index.js

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

+ 1 - 1
src/components/DilCommonUI/packages/table/src/table.vue

@@ -305,7 +305,7 @@ export default {
                 return prev;
               }
             }, 0);
-            sums[index];
+            sums[index] = sums[index].toFixed(3);
           } else {
             sums[index] = "N/A";
           }

+ 2 - 2
src/views/TMS/components/importedMine/addWagonLoad.vue

@@ -521,13 +521,13 @@ export default {
         });
         that.tableDataReal=tableData;
         if(tableData.length<=0){
-          that.$confirm('查询不到相关车皮!请联系万州港相关人员!')
+          that.$confirm('查询不到相关车皮!可能是没有出库,请联系万州港相关人员!')
           .then(_ => {
             that.isSend=false;
             done();
           });
         }else if(tableData.length<importData.length){
-           that.$confirm("共"+(importData.length-tableData.length)+"条车皮查询失败!请联系万州港相关人员!")
+           that.$confirm("共"+(importData.length-tableData.length)+"条车皮查询失败!可能是没有出库,请联系万州港相关人员!")
           .then(_ => {
             that.isSend=false;
             done();

+ 10 - 0
src/views/appoint/components/inward/transPrice.vue

@@ -24,6 +24,13 @@
             :isKuang="isKuang"
             @func="func"
           >
+            <el-table-column label="操作" width="120px" fixed="right">
+              <template slot-scope="scope">
+                <el-button type="text" @click="updatePriceMaterial(scope.row)">
+                  修改价格物资
+                </el-button>
+              </template>
+            </el-table-column>
           </dilTable>
         </el-tab-pane>
         <!-- 历史启用 -->
@@ -62,6 +69,9 @@ export default {
     };
   },
   methods: {
+    updatePriceMaterial(row) {
+      console.log(row);
+    },
     func() {
       this.loading = false;
       this.isKuang = false;

+ 116 - 59
src/views/inward/components/inwardSettlement/detailOrder.vue

@@ -47,7 +47,7 @@
             clearable
           ></el-input>
         </el-form-item>
-        <span>详单时间:</span>
+        <span>净重时间:</span>
         <el-date-picker
           v-model="startTime"
           type="datetime"
@@ -66,9 +66,10 @@
         <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
         >
+        <el-button type="primary" @click="newSettle">生成详单</el-button>
       </el-form>
     </div>
     <div class="table">
@@ -189,7 +190,10 @@ export default {
       exportAllList: [],
       noSettleDetailsColumn: [],
       settleDetailsColumn: [],
-      noDetailsColumn: []
+      noDetailsColumn: [],
+      orderList1: [],
+      orderList2: [],
+      orderList3: []
     };
   },
   created() {
@@ -198,7 +202,17 @@ export default {
     this.options3GetRequestUrl();
   },
   methods: {
+    handClick() {
+      if (this.activeName == "first") {
+        this.options1GetRequestUrl();
+      } else if (this.activeName == "second") {
+        this.options2GetRequestUrl();
+      } else {
+        this.options3GetRequestUrl();
+      }
+    },
     func(res) {
+      console.log(res);
       this.noSettleDetailsColumn = res.columnData;
       var totalWeight = 0;
       var totalAllMoney = 0;
@@ -208,13 +222,48 @@ export default {
       });
       this.totalNetWeight = totalWeight.toFixed(2) + "t";
       this.totalMoney = totalAllMoney.toFixed(2) + "元";
+      this.orderList1 = [];
+      res.list.forEach(e => {
+        let map = {
+          orderLineSeq: e.orderLineSeq,
+          orderId: e.orderId
+        };
+        this.orderList1.push(map);
+      });
     },
     func2(res) {
       this.settleDetailsColumn = res.columnData;
     },
     func3(res) {
+      console.log(res.list);
+      console.log("res");
+      this.orderList3 = [];
+      res.list.forEach(e => {
+        let map = {
+          orderLineSeq: e.orderLineSeq,
+          orderId: e.orderId
+        };
+        this.orderList3.push(map);
+      });
       this.noDetailsColumn = res.columnData;
     },
+    newSettle() {
+      console.log(this.orderList);
+      let orderList = [];
+      if (this.activeName == "third") {
+        orderList = this.orderList3;
+      } else {
+        orderList = this.orderList1;
+      }
+      debugger;
+      this.axios
+        .post("/api/v1/bms/newInwardSettle", { orderIds: orderList })
+        .then(res => {
+          console.log(res);
+          this.$message.success("生成成功");
+          this.options3GetRequestUrl();
+        });
+    },
     exportAllExcel() {
       let startTime = null;
       let endTime = null;
@@ -345,7 +394,8 @@ export default {
               "&i" +
               new Date() +
               "&orgCode=" +
-              orgCode
+              orgCode +
+              "&isPage=yes"
           )
           .then(res => {
             this.exportAllList = res.data.data;
@@ -433,7 +483,8 @@ export default {
       }
     },
     options3GetRequestUrl() {
-      this.options3.requestUrl = "/api/v1/bms/getNoInwardDetails?apiId=490";
+      this.options3.requestUrl =
+        "/api/v1/bms/getNoInwardDetails?apiId=490&i=" + new Date();
     },
     toInsert() {
       this.$router.push("/insertCheckInventory");
@@ -487,60 +538,66 @@ export default {
       if (this.screen1 == "用车单位") {
         shipperNames = this.input1;
       }
-      this.options1.requestUrl =
-        "/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() +
-        "&orgCode=" +
-        orgCode;
-      this.options2.requestUrl =
-        "/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() +
-        "&orgCode=" +
-        orgCode;
-      this.options3.requestUrl =
-        "/api/v1/bms/getNoInwardDetails?apiId=490" +
-        "&startTime=" +
-        startTime +
-        "&endTime=" +
-        endTime +
-        "&shipperNames=" +
-        shipperNames +
-        "&materialTypeNames=" +
-        materialTypeNames +
-        "&transRangeValues=" +
-        transRangeValues +
-        "&capacityNo=" +
-        capacityNo +
-        "&i" +
-        new Date() +
-        "&orgCode=" +
-        orgCode;
+      if (this.activeName == "first") {
+        this.options1.requestUrl =
+          "/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() +
+          "&orgCode=" +
+          orgCode;
+      }
+      if (this.activeName == "second") {
+        this.options2.requestUrl =
+          "/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() +
+          "&orgCode=" +
+          orgCode;
+      }
+      if (this.activeName == "third") {
+        this.options3.requestUrl =
+          "/api/v1/bms/getNoInwardDetails?apiId=490" +
+          "&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&shipperNames=" +
+          shipperNames +
+          "&materialTypeNames=" +
+          materialTypeNames +
+          "&transRangeValues=" +
+          transRangeValues +
+          "&capacityNo=" +
+          capacityNo +
+          "&i" +
+          new Date() +
+          "&orgCode=" +
+          orgCode;
+      }
     },
     //运输订单点击浏览的事件
     select() {

+ 66 - 52
src/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue

@@ -80,30 +80,34 @@
           <el-button type="primary" class="btn" @click="onclick">
             <i class="el-icon-search"></i>
           </el-button>
+          <el-button type="primary" class="btn" @click="batchOperate"
+            >批量保存</el-button
+          >
         </el-form-item>
         <el-form-item>
-            <el-autocomplete
-              class="inline-input"
-              v-model="receiveName"
-              :fetch-suggestions="querySearchConsignee"
-              placeholder="请输入收货单位名称"
-              @select="handleSelectionChange()">
-            </el-autocomplete>
+          <el-autocomplete
+            class="inline-input"
+            v-model="receiveName"
+            :fetch-suggestions="querySearchConsignee"
+            placeholder="请输入收货单位名称"
+            @select="handleSelectionChange()"
+          >
+          </el-autocomplete>
         </el-form-item>
-         <el-form-item>
-           <el-select
-              size="mini"
-              v-model="sendStationId"
-              @change="handleMulSendChange()"
+        <el-form-item>
+          <el-select
+            size="mini"
+            v-model="sendStationId"
+            @change="handleMulSendChange()"
+          >
+            <el-option
+              v-for="item in sendStationList"
+              :key="item.sendStationId"
+              :label="item.sendStation"
+              :value="item.sendStationId"
             >
-              <el-option
-                v-for="item in sendStationList"
-                :key="item.sendStationId"
-                :label="item.sendStation"
-                :value="item.sendStationId"
-              >
-              </el-option>
-            </el-select>
+            </el-option>
+          </el-select>
         </el-form-item>
       </el-form>
     </div>
@@ -119,12 +123,12 @@
         :cell-style="{ fontWeight: '700' }"
         class="table"
         :span-method="objectSpanMethod"
-        @selection-change="handleSelectionChange();handleMulSendChange()"
+        @selection-change="
+          handleSelectionChange();
+          handleMulSendChange();
+        "
       >
-        <el-table-column
-          type="selection"
-          width="55">
-        </el-table-column>
+        <el-table-column type="selection" width="55"> </el-table-column>
         <el-table-column
           prop="index"
           width="50"
@@ -338,7 +342,7 @@ export default {
       //收货客户列表
       consigneeList: [],
       receiveName: null,
-      sendStationId: null,
+      sendStationId: null
     };
   },
   created() {
@@ -348,30 +352,42 @@ export default {
     this.information();
   },
   methods: {
-    handleSelectionChange(){
+    batchOperate() {
+      console.log(this.$refs.tableRef.data);
+      this.axios
+        .post(
+          "/api/v1/ams/batchUpdateInwardConsignee",
+          this.$refs.tableRef.data
+        )
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("批量保存成功");
+            this.getRequestUrl();
+          }
+        });
+    },
+    handleSelectionChange() {
       //批量绑定收货客户
-      let selection=this.$refs.tableRef.selection;
-      console.log("selection:",selection);
-      if(!selection)
-        return;
+      let selection = this.$refs.tableRef.selection;
+      console.log("selection:", selection);
+      if (!selection) return;
       this.consigneeList.forEach(e => {
         if (e.consigneeCompanyName == this.receiveName) {
-           selection.forEach((row)=>{
-              row.receiveName = e.consigneeCompanyName;
-              row.consigneeId = e.consigneeId;
+          selection.forEach(row => {
+            row.receiveName = e.consigneeCompanyName;
+            row.consigneeId = e.consigneeId;
           });
         }
       });
     },
-    handleMulSendChange(){
+    handleMulSendChange() {
       //批量绑定发站
-      let selection=this.$refs.tableRef.selection;
-      console.log("selection:",selection);
-      if(!selection || !this.sendStationId)
-        return;
-      selection.forEach((row)=>{
-          row.sendStationId = this.sendStationId;
-          this.changesendStation(row);
+      let selection = this.$refs.tableRef.selection;
+      console.log("selection:", selection);
+      if (!selection || !this.sendStationId) return;
+      selection.forEach(row => {
+        row.sendStationId = this.sendStationId;
+        this.changesendStation(row);
       });
     },
     handleSelectConsignee(row, index, item) {
@@ -401,16 +417,14 @@ export default {
               cb(results);
             }
           });
-      }else{
-          //历史收货客户
-          this.axios
-            .post("/api/v1/uc/getConsigneeHistory")
-            .then(res => {
-              if (res.data.code == "200") {
-                console.log(res);
-                this.consigneeList = res.data.data;
-                cb(this.consigneeList);
-              }
+      } else {
+        //历史收货客户
+        this.axios.post("/api/v1/uc/getConsigneeHistory").then(res => {
+          if (res.data.code == "200") {
+            console.log(res);
+            this.consigneeList = res.data.data;
+            cb(this.consigneeList);
+          }
         });
       }
     },

+ 89 - 5
src/views/inward/components/offsetSteel/saleSteelTruckOrder/platformStockInfo.vue

@@ -58,6 +58,9 @@
           <el-button type="primary" class="btn" @click="onclick">
             <i class="el-icon-search"></i>
           </el-button>
+          <el-button type="primary" class="btn" @click="batchOperate"
+            >批量保存</el-button
+          >
         </el-form-item>
       </el-form>
     </div>
@@ -74,6 +77,7 @@
         :summary-method="getSummaries"
         show-summary
         class="table"
+        :span-method="objectSpanMethod"
       >
         <el-table-column width="50" label="序号" align="center" type="index">
         </el-table-column>
@@ -270,7 +274,7 @@
           prop="number"
           label="票号"
           align="center"
-          width="150px"
+          width="180px"
         >
         </el-table-column>
         <el-table-column
@@ -328,7 +332,9 @@ export default {
         "materialNum"
       ],
       operateName: "编辑",
-      unloadPointList: []
+      unloadPointList: [],
+      spanArr: [],
+      mergeList: [""]
     };
   },
   created() {
@@ -338,6 +344,47 @@ export default {
     this.showSummariesPosition();
   },
   methods: {
+    batchOperate() {
+      this.$refs.tableRef.data.forEach((e, index) => {
+        this.$refs.tableRef.data.forEach((item, index) => {
+          if (
+            item.unloadPointId == null &&
+            e.consigneeId == item.consigneeId &&
+            e.consigneeId != null &&
+            e.unloadPointId != null
+          ) {
+            item.unloadPointId = e.unloadPointId;
+            item.unloadPoint = e.unloadPoint;
+          }
+        });
+      });
+      this.$refs.tableRef.data.forEach(row => {
+        row.personnelSsoId = getCookie("userId");
+        if (
+          (typeof row.EnStation == "object" ||
+            typeof row.EnStation == "string") &&
+          row.EnStation != null
+        ) {
+          row.EnStation = sjTime(new Date(row.EnStation));
+        }
+        if (
+          (typeof row.OutStation == "object" ||
+            typeof row.OutStation == "string") &&
+          row.OutStation != null
+        ) {
+          row.OutStation = sjTime(new Date(row.OutStation));
+        }
+      });
+      this.axios
+        .post("/api/v1/wms/listAfterInwardOutbound", this.$refs.tableRef.data)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("批量保存成功");
+            this.getRequestUrl();
+          }
+        });
+      console.log(this.$refs.tableRef.data);
+    },
     handleSelectWarehouse(row, index, item) {
       console.log(item);
       this.unloadPointList.forEach(e => {
@@ -446,11 +493,14 @@ export default {
             "&toTheStation=" +
             toTheStation +
             "&sendStation=" +
-            sendStation
+            sendStation +
+            "&i=" +
+            new Date()
         )
         .then(res => {
           this.tableData = res.data.data;
           this.showSummariesPosition();
+          this.getSpanArr();
         });
     },
     //获取后台数据
@@ -463,6 +513,7 @@ export default {
         .then(res => {
           console.log(res.data.data);
           this.tableData = res.data.data;
+          this.getSpanArr();
           this.showSummariesPosition();
         });
     },
@@ -513,16 +564,49 @@ export default {
                 return prev;
               }
             }, 0);
-            sums[index];
+            sums[index] = sums[index].toFixed(2);
+            // console.log("sums");
+            // console.log(sums[index]);
           } else {
             sums[index] = "N/A";
           }
         }
         //遍历数组,找到符合条件的列
       });
-
       return sums;
     },
+    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].trainOrderId === data[i - 1].trainOrderId) {
+            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.mergeList.includes(column.property)) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
     //导出Excel
     exportAllReportToExcel() {
       console.log(this.$refs.tableRef);

+ 4 - 2
src/views/inward/components/truckAppoint/addPlan.vue

@@ -29,7 +29,7 @@
 </div>
     <template>
 			<div>		
-			<dilTable v-bind.sync="first" @radio-change="currentRadioChange" ref="table">
+			<mergeRowTable v-bind.sync="first" @radio-change="currentRadioChange" ref="table">
             <el-table-column fixed="right" label="操作" width="120">
                 <template slot-scope="scope">
                   <el-button type="text" size="mini" @click="deleteRequirement(scope)">
@@ -37,7 +37,7 @@
                   </el-button>
                 </template>
               </el-table-column>
-			</dilTable>
+			</mergeRowTable>
       </div>
 		</template>
     <div class="button-box">
@@ -62,6 +62,8 @@ export default {
       first:{
         requestUrl:"/api/v1/ams/getTruckRequirementList?apiId=250&requirementStatus=2",
         selectionType: "radio",
+        columnIndexs:[0,1,2,3,4,20,21,22],
+        comparison: "requirementNumber",
 				mapList: {},
       },
       numberValidateForm: {

+ 11 - 10
src/views/inward/components/truckAppoint/addRequirement2.vue

@@ -311,7 +311,7 @@
       </el-drawer>
     </div>
     <div class="button-box">
-      <el-button type="primary" @click="makeSure" :disabled="disabled"
+      <el-button type="primary" @click="makeSure" 
         >确认新增</el-button
       >
       <el-button type="primary" @click="cancel">返回</el-button>
@@ -579,15 +579,13 @@ export default {
       //执行选择
     },
     handleClose2(done) {
-      console.log("add2");
-
       console.log(this.tableData.length);
-      console.log("ad");
-      if (this.tableData.length > 0 && this.selectionList1.length > 0) {
+      console.log("this.form.requirementType:",this.form.requirementType);
+      if (this.tableData.length > 0 && this.selectionList1.length > 0 && this.form.requirementType!='倒库') {
         this.$message.warning("一个需求只允许填写一个物资");
         return;
       }
-      if (this.selectionList1.length > 1) {
+      if (this.selectionList1.length > 1 && this.form.requirementType!='倒库') {
         this.$message.warning("一个需求只允许填写一个物资");
         return;
       }
@@ -669,12 +667,11 @@ export default {
     // 返回主界面
     makeSure1() {
       console.log(this.tableData.length);
-      console.log("ad");
-      if (this.tableData.length > 0 && this.selectionList1.length > 0) {
+      if (this.tableData.length > 0 && this.selectionList1.length > 0 && this.form.requirementType!="倒库") {
         this.$message.warning("一个需求只允许填写一个物资");
         return;
       }
-      if (this.selectionList1.length > 1) {
+      if (this.selectionList1.length > 1 && this.form.requirementType!="倒库") {
         this.$message.warning("一个需求只允许填写一个物资");
         return;
       }
@@ -800,6 +797,10 @@ export default {
       // console.log("进来了");
       // console.log(this.whether);
       // console.log(this.installremark);
+      if (this.tableData.length > 1 && this.form.requirementType!='倒库') {
+        this.$message.warning("非倒库需求只允许填写一个物资");
+        return;
+      }
       if (this.whether == 2 && this.installremark == "") {
         console.log("确实进来了");
         this.$message.warning("请选择装机必填");
@@ -857,7 +858,7 @@ export default {
       }
       // console.log(this.tableData)
       var DueTime;
-      if (this.DueTime == null) {
+      if (this.DueTime == null && this.isOpenDueTime == true) {
         this.$message.warning("截止日期必填");
         this.disabled = false;
         return;

+ 4 - 2
src/views/inward/components/truckAppoint/plan.vue

@@ -89,7 +89,7 @@
             </dilTable>
           </el-tab-pane>
           <el-tab-pane label="已下发" name="third">
-            <dilTable v-bind.sync="third" ref="table2">
+            <mergeRowTable v-bind.sync="third" ref="table2">
               <el-table-column
                 fixed="right"
                 align="center"
@@ -132,7 +132,7 @@
                   </el-form>
                 </template>
               </el-table-column>
-            </dilTable>
+            </mergeRowTable>
           </el-tab-pane>
           <!-- <el-tab-pane label="已完成" name="fourth">
             <dilTable
@@ -201,6 +201,8 @@ export default {
         mapList: []
       },
       third: {
+        columnIndexs:[0,1,2,3,4,5,9,10,13,16,21,22],
+        comparison: "requirementNumber",
         // second请求数据的地址
         requestUrl: ""
       },

+ 8 - 4
src/views/inward/components/truckAppoint/requirement.vue

@@ -36,7 +36,7 @@
       <div>
         <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tab-pane label="未下发" name="first">
-            <dilTable
+            <mergeRowTable
               v-bind.sync="first"
               @selection-change="selectionChange"
               ref="table"
@@ -52,10 +52,10 @@
                   </el-button>
                 </template>
               </el-table-column>
-            </dilTable>
+            </mergeRowTable>
           </el-tab-pane>
           <el-tab-pane label="已下发" name="second">
-            <dilTable
+            <mergeRowTable
               v-bind.sync="second"
               ref="table1"
               :isPagination="false"
@@ -71,7 +71,7 @@
                   >
                 </template>
               </el-table-column>
-            </dilTable>
+            </mergeRowTable>
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -92,9 +92,13 @@ export default {
         // first请求数据的地址
         requestUrl: "",
         selectionType: "select",
+        columnIndexs:[0,1,2,6,7,8,9,22],
+        comparison: "requirementNumber",
         mapList: []
       },
       second: {
+        columnIndexs:[0,1,5,6,7,8,9,21],
+        comparison: "requirementNumber",
         // second请求数据的地址
         requestUrl: ""
       },

+ 8 - 4
src/views/inward/components/truckAppoint/requirementOther.vue

@@ -44,7 +44,7 @@
       <div>
         <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tab-pane label="未下发" name="first">
-            <dilTable
+            <mergeRowTable
               v-bind.sync="first"
               @selection-change="selectionChange"
               ref="table1"
@@ -60,10 +60,10 @@
                   </el-button>
                 </template>
               </el-table-column>
-            </dilTable>
+            </mergeRowTable>
           </el-tab-pane>
           <el-tab-pane label="已下发" name="second">
-            <dilTable v-bind.sync="second" ref="table">
+            <mergeRowTable v-bind.sync="second" ref="table">
               <el-table-column fixed="right" label="操作" width="80">
                 <template slot-scope="scope">
                   <el-button
@@ -74,7 +74,7 @@
                   >
                 </template>
               </el-table-column>
-            </dilTable>
+            </mergeRowTable>
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -95,10 +95,14 @@ export default {
         // first请求数据的地址
         requestUrl: "",
         selectionType: "select",
+        columnIndexs:[0,1,2,6,7,8,9,22],
+        comparison: "requirementNumber",
         mapList: []
       },
       second: {
         // second请求数据的地址
+        columnIndexs:[0,1,5,6,7,8,9,21],
+        comparison: "requirementNumber",
         requestUrl: ""
       },
       tableData: [],

+ 11 - 5
src/views/inward/components/truckOrder/plan.vue

@@ -12,7 +12,7 @@
       <div>
         <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tab-pane label="待分解" name="second">
-            <dilTable v-bind.sync="second" ref="table1">
+            <mergeRowTable v-bind.sync="second" ref="table1">
               <el-table-column fixed="right" label="操作" width="100">
                 <template slot-scope="scope">
                   <el-button
@@ -24,10 +24,10 @@
                   </el-button>
                 </template>
               </el-table-column>
-            </dilTable>
+            </mergeRowTable>
           </el-tab-pane>
           <el-tab-pane label="已分解" name="third">
-            <dilTable v-bind.sync="third" ref="table2">
+            <mergeRowTable v-bind.sync="third" ref="table2">
               <el-table-column fixed="right" label="操作" width="180">
                 <template slot-scope="scope">
                   <el-button
@@ -76,11 +76,11 @@
                   </el-form>
                 </template>
               </el-table-column>
-            </dilTable>
+            </mergeRowTable>
           </el-tab-pane>
 
           <el-tab-pane label="已完成" name="four">
-            <dilTable v-bind.sync="four" ref="table3"> </dilTable>
+            <mergeRowTable v-bind.sync="four" ref="table3"> </mergeRowTable>
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -95,14 +95,20 @@ export default {
       inputText: "",
       carrierId: 40,
       first: {
+        columnIndexs:[0,1,2,3,4,5,9.10,21,22],
+        comparison: "requirementNumber",
         // first请求数据的地址
         requestUrl: ""
       },
       second: {
+        columnIndexs:[0,1,2,3,4,5,9.10,21,22],
+        comparison: "requirementNumber",
         // second请求数据的地址
         requestUrl: ""
       },
       third: {
+        columnIndexs:[0,1,2,3,4,5,9.10,21,22],
+        comparison: "requirementNumber",
         // second请求数据的地址
         requestUrl: ""
       },

+ 25 - 4
src/views/inward/components/truckOrder/purInwardTruckOrder.vue

@@ -6,9 +6,15 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" @click="Insert" v-if="activeName == 'first'">
-        <i class="el-icon-plus"></i>新增
-      </el-button>
+      <el-badge  
+      :value="addPlanCount"
+      class="item"
+      v-if="activeName == 'first'"
+      style="margin-left:10px">
+        <el-button type="primary" @click="Insert" v-if="activeName == 'first'">
+          <i class="el-icon-plus"></i>新增
+        </el-button>
+      </el-badge>
     </div>
     <el-dialog
       title="车辆信息"
@@ -133,9 +139,11 @@ export default {
       //多选的选中的订单id
       selectionList: [],
       //区别点击的是添加运力,还是修改
-      index: null
+      index: null,
       // wssUrl: "wss:wl.dasteel.cn:32322/websocket/socketServer",
       // actiones: { username: "湘M99999" } //传入后台的数据
+      addPlanCount:0,
+      timer:null,
     };
   },
   created() {
@@ -184,7 +192,20 @@ export default {
     }
     // this.initWebSocket();
   },
+  mounted(){
+    this.getAddPlan();
+    this.timer=setInterval(this.getAddPlan, 10000);
+  },
+  beforeDestroy(){
+    clearInterval(this.timer);
+  },
   methods: {
+    getAddPlan() {
+      this.axios.post( "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2&pageNum=1&pageSize=10").then(res => {
+        console.log("data:",res.data.data);
+        this.addPlanCount = res.data.data.total;
+      });
+    },
     //建立websocket连接
     initWebSocket() {
       //试图调用websocket

+ 52 - 2
src/views/statisticalReport/components/dowmShipDynamicTable.vue

@@ -62,7 +62,7 @@
           </el-table-column>
            <el-table-column
           align="center"
-            prop="instructPlannedLoading"
+            prop="planLoadTon"
             label="计划吨位"
             width="100px">
           </el-table-column>
@@ -108,6 +108,10 @@ export default {
         tableData:[],
         spanArr: [], // 用于存放需要合并的行的个数
         spanIndex: 0, // 记录spanArr数组的下标
+        spanArr2: [], // 用于存放需要合并的行的个数
+        spanIndex2: 0, // 记录spanArr数组的下标
+        spanArr3:[],
+        spanIndex:0,
         map:{
             input:"",
             startTime:null,
@@ -189,6 +193,16 @@ export default {
             sums[index] = '';
             return;
           }
+          if(index === 2){
+            let sum=new BigNumber(0);
+            data.forEach((row,rowIndex)=>{
+              if(rowIndex ==0 || row.gmId !=  data[rowIndex-1].gmId){
+                sum=sum.plus(row.gmTonnage);
+              }
+            })
+            sums[index] = sum.toNumber();
+            return; 
+          }
           const values = data.map(item => Number(item[column.property]));
           if (!values.every(value => isNaN(value))) {
             sums[index] = values.reduce((prev, curr) => {
@@ -208,12 +222,18 @@ export default {
     //处理数据,得到合并数组
     getSpanArr(data) {
         this.spanArr=[];
+        this.spanArr2=[];
+        this.spanArr3=[];
         for (let i = 0; i < data.length; i++) {
             if (i == 0) {
                 this.spanArr.push(1);
+                this.spanArr2.push(1);
+                this.spanArr3.push(1);
                 this.spanIndex = 0;
+                this.spanIndex2 = 0;
+                this.spanIndex3 = 0;
             } else {
-                // 判断当前行与前一行内容是否相同
+                // 判断当前行与前一行内容是否相同:港口名
                 if (data[i].portName == data[i - 1].portName) {
                     this.spanArr[this.spanIndex] += 1; // 相同的话,当前下标所代表的值加一,例如:第一列的前三行可合并
                     this.spanArr.push(0);// 记录完毕后,再往数组里添加一个元素0,作为下一次合并的初始值
@@ -221,6 +241,22 @@ export default {
                     this.spanArr.push(1); // 否则,依旧是一行
                     this.spanIndex = i;
                 }
+                // 判断当前行与前一行内容是否相同:发货通知
+                if (data[i].productName == data[i - 1].productName) {
+                    this.spanArr2[this.spanIndex2] += 1; // 相同的话,当前下标所代表的值加一,例如:第一列的前三行可合并
+                    this.spanArr2.push(0);// 记录完毕后,再往数组里添加一个元素0,作为下一次合并的初始值
+                } else {
+                    this.spanArr2.push(1); // 否则,依旧是一行
+                    this.spanIndex2 = i;
+                }
+                // 判断当前行与前一行内容是否相同:港口库存
+                if (data[i].gmId == data[i - 1].gmId) {
+                    this.spanArr3[this.spanIndex3] += 1; // 相同的话,当前下标所代表的值加一,例如:第一列的前三行可合并
+                    this.spanArr3.push(0);// 记录完毕后,再往数组里添加一个元素0,作为下一次合并的初始值
+                } else {
+                    this.spanArr3.push(1); // 否则,依旧是一行
+                    this.spanIndex3 = i;
+                }
             }
         }
         console.log("spanArr",this.spanArr);
@@ -234,6 +270,20 @@ export default {
                 rowspan: _row,
                 colspan: _col
             };
+        }else if(columnIndex === 1){
+            const _row = this.spanArr2[rowIndex]; // 行数
+            const _col = _row > 0 ? 1 : 0; // 列数
+            return {
+                rowspan: _row,
+                colspan: _col
+            };
+        }else if(columnIndex === 2){
+            const _row = this.spanArr3[rowIndex]; // 行数
+            const _col = _row > 0 ? 1 : 0; // 列数
+            return {
+                rowspan: _row,
+                colspan: _col
+            };
         }
     },
   },