Browse Source

修改火运导入样式;新增计量委托总吨位

liyg 2 years ago
parent
commit
27a86e287c

+ 2 - 0
package.json

@@ -26,6 +26,7 @@
     "apollo-link-http": "^1.5.14",
     "apollo-link-http": "^1.5.14",
     "axios": "^0.26.1",
     "axios": "^0.26.1",
     "babel-polyfill": "^6.26.0",
     "babel-polyfill": "^6.26.0",
+    "bignumber.js": "^9.0.2",
     "crypto": "^1.0.1",
     "crypto": "^1.0.1",
     "echarts": "^4.1.0",
     "echarts": "^4.1.0",
     "el-cascader-multi": "^1.1.8",
     "el-cascader-multi": "^1.1.8",
@@ -39,6 +40,7 @@
     "jspdf": "^2.5.1",
     "jspdf": "^2.5.1",
     "jssha": "^3.2.0",
     "jssha": "^3.2.0",
     "lay-excel": "^1.7.6",
     "lay-excel": "^1.7.6",
+    "mathjs": "^10.6.4",
     "object-assign": "^4.1.1",
     "object-assign": "^4.1.1",
     "qs": "^6.9.3",
     "qs": "^6.9.3",
     "sass-loader": "^6.0.7",
     "sass-loader": "^6.0.7",

+ 16 - 0
src/views/TMS/components/domesticMine/entrustMine.vue

@@ -47,12 +47,17 @@
         </dilTable>
         </dilTable>
       </el-tab-pane>
       </el-tab-pane>
     </el-tabs>
     </el-tabs>
+    <div class="count" v-show="sum1>0 && activeName == 'second'" style="margin-right:50px;font-size:18px;">
+      <div style="display:flex;flex-direction:row-reverse">标重总吨位:{{sum1}}</div>
+      <div style="display:flex;flex-direction:row-reverse">净重总吨位:{{sum2}}</div>
+    </div>
   </div>
   </div>
 </template>
 </template>
 
 
 
 
 <script>
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
 import { sjTime } from "@/utils/sharedJsFile";
+import bignumber,{BigNumber} from 'bignumber.js';
 export default {
 export default {
   data() {
   data() {
     return {
     return {
@@ -77,6 +82,8 @@ export default {
       startTime: null,
       startTime: null,
       endTime: null,
       endTime: null,
       tableTitle: "国产矿计量表",
       tableTitle: "国产矿计量表",
+      sum1:0.0,
+      sum2:0.0,
     };
     };
   },
   },
   methods: {
   methods: {
@@ -144,9 +151,18 @@ export default {
       this.selectionListMap = selection;
       this.selectionListMap = selection;
     },
     },
     selectionChange2(selection) {
     selectionChange2(selection) {
+      let that=this;
       this.selectionListMap2 = [];
       this.selectionListMap2 = [];
       console.log(selection);
       console.log(selection);
       this.selectionListMap2 = selection;
       this.selectionListMap2 = selection;
+      let sum1 = 0;
+      let sum2 = new BigNumber(0);
+      selection.forEach(element => {
+        sum1+=element.resultBillableTonnage;
+        sum2=sum2.plus(element.resultNetWeight);
+      });
+      this.sum1=sum1;
+      this.sum2=sum2.toNumber();
     },
     },
     refresh(){
     refresh(){
       this.$router.go(0);
       this.$router.go(0);

+ 6 - 11
src/views/TMS/components/domesticMine/wagonLoadAdd.vue

@@ -14,11 +14,11 @@
       </el-upload>
       </el-upload>
       <div style="margin-right:200px;">当前导入数量:{{tableData.length}}</div>
       <div style="margin-right:200px;">当前导入数量:{{tableData.length}}</div>
     </div>
     </div>
-    <div class="table item">
+    <div class="importedTable" style="height:300px;overflow:scroll;">
       <el-table
       <el-table
-        stripe
+        highlight-current-row
         :data="tableData"
         :data="tableData"
-        style="width: 100%"
+        :row-style="{height:'40px'}"
         id="domesticTable">
         id="domesticTable">
         <el-table-column
         <el-table-column
         type="index"
         type="index"
@@ -96,7 +96,7 @@
         <dil-form :formId="364" v-model="form1" ref="from1"></dil-form>
         <dil-form :formId="364" v-model="form1" ref="from1"></dil-form>
       </div>
       </div>
     </div>
     </div>
-    <div class="button_box">
+    <div class="button_box_domestic">
       <el-button @click="cancel">取消</el-button>
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" :loading="isLoading"  @click="makeSure">确定</el-button>
       <el-button type="primary" :loading="isLoading"  @click="makeSure">确定</el-button>
     </div>
     </div>
@@ -614,16 +614,11 @@ export default {
       }
       }
     }
     }
   }
   }
-  .button_box {
+  .button_box_domestic {
     display: flex;
     display: flex;
     justify-content: center;
     justify-content: center;
-    margin-top: 30px;
-    margin-bottom: 30px;
+    padding-top: 10px;
   }
   }
-   .fromOther  .el-input__inner{
-    width: 250px;
-  }
- 
 }
 }
 </style>
 </style>
 
 

+ 2 - 2
src/views/TMS/components/domesticMine/wagonLoadMine.vue

@@ -33,12 +33,12 @@
           type="text" size="small"
           type="text" size="small"
             >修改</el-button
             >修改</el-button
           >
           >
-          <el-button
+          <!-- <el-button
             type="text"
             type="text"
             size="small"
             size="small"
             @click="deleteclick(scope.row.resultId)"
             @click="deleteclick(scope.row.resultId)"
             >删除</el-button
             >删除</el-button
-          >
+          > -->
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </dilTable>
     </dilTable>

+ 6 - 5
src/views/TMS/components/importedEmergency/addWagonLoadEmergency.vue

@@ -15,11 +15,12 @@
       </el-upload>
       </el-upload>
       <span >当前导入数量:{{tableData.length}}</span>
       <span >当前导入数量:{{tableData.length}}</span>
     </div>
     </div>
-    <div class="table item">
+    <div class="importedTable" style="height:300px;overflow:scroll;">
       <el-table
       <el-table
-        stripe
+        highlight-current-row
         :data="tableData"
         :data="tableData"
-        style="width: 100%"
+        :row-style="{height:'40px'}"
+        style="width: 100%,font-size: 20px"
         id="domesticTable">
         id="domesticTable">
         <el-table-column
         <el-table-column
         type="index"
         type="index"
@@ -162,7 +163,7 @@ export default {
       inputText: "",
       inputText: "",
       sendStationId:2,
       sendStationId:2,
       toTheStationId:1,
       toTheStationId:1,
-      sendStation:"万州港",
+      sendStation:"新区轨道衡",
       toTheStation:"老区轨道衡"
       toTheStation:"老区轨道衡"
     };
     };
   },
   },
@@ -605,7 +606,7 @@ export default {
   .button-box {
   .button-box {
     display: flex;
     display: flex;
     justify-content: center;
     justify-content: center;
-    padding-top: 30px;
+    padding-top: 10px;
   }
   }
   .formOther  .el-input__inner{
   .formOther  .el-input__inner{
     width: 250px;
     width: 250px;

+ 13 - 1
src/views/TMS/components/importedEmergency/entrustEmergency.vue

@@ -39,13 +39,17 @@
         </dilTable>
         </dilTable>
       </el-tab-pane>
       </el-tab-pane>
     </el-tabs>
     </el-tabs>
+    <div class="count" v-show="sum1>0 && activeName == 'second'" style="margin-right:50px;font-size:18px;">
+      <div style="display:flex;flex-direction:row-reverse">标重总吨位:{{sum1}}</div>
+      <div style="display:flex;flex-direction:row-reverse">净重总吨位:{{sum2}}</div>
+    </div>
   </div>
   </div>
 </template>
 </template>
 
 
 
 
 <script>
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
 import { sjTime } from "@/utils/sharedJsFile";
-
+import bignumber,{BigNumber} from 'bignumber.js';
 export default {
 export default {
   data() {
   data() {
     return {
     return {
@@ -139,6 +143,14 @@ export default {
       this.selectionListMap2 = [];
       this.selectionListMap2 = [];
       console.log(selection);
       console.log(selection);
       this.selectionListMap2 = selection;
       this.selectionListMap2 = selection;
+      let sum1 = 0;
+      let sum2 = new BigNumber(0);
+      selection.forEach(element => {
+        sum1+=element.resultBillableTonnage;
+        sum2=sum2.plus(element.resultNetWeight);
+      });
+      this.sum1=sum1;
+      this.sum2=sum2.toNumber();
     },
     },
     refresh(){
     refresh(){
       this.$router.go(0);
       this.$router.go(0);

+ 5 - 6
src/views/TMS/components/importedEmergency/wagonLoadEmergency.vue

@@ -28,18 +28,17 @@
     <dilTable v-bind.sync="option">
     <dilTable v-bind.sync="option">
       <el-table-column fixed="right" label="操作" width="100">
       <el-table-column fixed="right" label="操作" width="100">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <el-button
-            @click="onclick(2, scope.row.resultId)"
-            type="text"
-            size="small"
+           <el-button @click="click(scope.row.resultId)"  
+           :disabled="!scope.row.isEdit"
+          type="text" size="small"
             >修改</el-button
             >修改</el-button
           >
           >
-          <el-button
+          <!-- <el-button
             type="text"
             type="text"
             size="small"
             size="small"
             @click="deleteclick(scope.row.resultId)"
             @click="deleteclick(scope.row.resultId)"
             >删除</el-button
             >删除</el-button
-          >
+          > -->
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </dilTable>
     </dilTable>

+ 6 - 5
src/views/TMS/components/importedMine/addWagonLoad.vue

@@ -15,11 +15,12 @@
       </el-upload>
       </el-upload>
       <span >当前导入数量:{{tableData.length}}</span>
       <span >当前导入数量:{{tableData.length}}</span>
     </div>
     </div>
-    <div class="table item">
+    <div class="importedTable" style="height:300px;overflow:scroll;">
       <el-table
       <el-table
-        stripe
+        highlight-current-row
         :data="tableData"
         :data="tableData"
-        style="width: 100%"
+        :row-style="{height:'40px'}"
+        style="width: 100%,font-size: 20px"
         id="domesticTable">
         id="domesticTable">
         <el-table-column
         <el-table-column
         type="index"
         type="index"
@@ -160,7 +161,7 @@ export default {
       a: 1,
       a: 1,
       direction: "rtl",
       direction: "rtl",
       inputText: "",
       inputText: "",
-      sendStationId:2,
+      sendStationId:4,
       toTheStationId:1,
       toTheStationId:1,
       sendStation:"万州港",
       sendStation:"万州港",
       toTheStation:"老区轨道衡"
       toTheStation:"老区轨道衡"
@@ -605,7 +606,7 @@ export default {
   .button-box {
   .button-box {
     display: flex;
     display: flex;
     justify-content: center;
     justify-content: center;
-    padding-top: 30px;
+    padding-top: 10px;
   }
   }
   .formOther  .el-input__inner{
   .formOther  .el-input__inner{
     width: 250px;
     width: 250px;

+ 15 - 1
src/views/TMS/components/importedMine/entrust.vue

@@ -44,17 +44,21 @@
           ref="excelDom"
           ref="excelDom"
           v-bind.sync="option2"
           v-bind.sync="option2"
           @selection-change="selectionChange2"
           @selection-change="selectionChange2"
-          v-if="activeName == 'second'"
         >
         >
         </dilTable>
         </dilTable>
       </el-tab-pane>
       </el-tab-pane>
     </el-tabs>
     </el-tabs>
+    <div class="count" v-show="sum1>0 && activeName == 'second'" style="margin-right:50px;font-size:18px;">
+      <div style="display:flex;flex-direction:row-reverse">标重总吨位:{{sum1}}</div>
+      <div style="display:flex;flex-direction:row-reverse">净重总吨位:{{sum2}}</div>
+    </div>
   </div>
   </div>
 </template>
 </template>
 
 
 
 
 <script>
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
 import { sjTime } from "@/utils/sharedJsFile";
+import bignumber,{BigNumber} from 'bignumber.js';
 export default {
 export default {
   data() {
   data() {
     return {
     return {
@@ -79,6 +83,8 @@ export default {
       startTime: null,
       startTime: null,
       endTime: null,
       endTime: null,
       tableTitle: "万州港-达州计量表",
       tableTitle: "万州港-达州计量表",
+      sum1:0.0,
+      sum2:0.0,
     };
     };
   },
   },
   methods: {
   methods: {
@@ -148,6 +154,14 @@ export default {
       this.selectionListMap2 = [];
       this.selectionListMap2 = [];
       console.log(selection);
       console.log(selection);
       this.selectionListMap2 = selection;
       this.selectionListMap2 = selection;
+      let sum1 = 0;
+      let sum2 = new BigNumber(0);
+      selection.forEach(element => {
+        sum1+=element.resultBillableTonnage;
+        sum2=sum2.plus(element.resultNetWeight);
+      });
+      this.sum1=sum1;
+      this.sum2=sum2.toNumber();
     },
     },
     refresh(){
     refresh(){
       this.$router.go(0);
       this.$router.go(0);

+ 6 - 4
src/views/TMS/components/importedMine/wagonLoad.vue

@@ -29,15 +29,17 @@
     <dilTable v-bind.sync="option">
     <dilTable v-bind.sync="option">
       <el-table-column fixed="right" label="操作" width="100">
       <el-table-column fixed="right" label="操作" width="100">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <el-button @click="click(scope.row.resultId)" type="text" size="small"
+          <el-button @click="click(scope.row.resultId)"  
+           :disabled="!scope.row.isEdit"
+          type="text" size="small"
             >修改</el-button
             >修改</el-button
           >
           >
-          <el-button
+          <!-- <el-button
             type="text"
             type="text"
             size="small"
             size="small"
             @click="deleteclick(scope.row.resultId)"
             @click="deleteclick(scope.row.resultId)"
             >删除</el-button
             >删除</el-button
-          >
+          > -->
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </dilTable>
     </dilTable>
@@ -96,7 +98,7 @@ export default {
       }
       }
     },
     },
     btnclick() {
     btnclick() {
-      this.$router.push("/addWagonLoadCopy");
+      this.$router.push("/addWagonLoad");
     },
     },
     click(resultId) {
     click(resultId) {
       this.$router.push("/editWagonLoad/" + resultId);
       this.$router.push("/editWagonLoad/" + resultId);