luobang 3 лет назад
Родитель
Сommit
8a6ad8b741

+ 17 - 2
src/views/inward/components/inwardSettlement/purInwardDetailsOrder.vue

@@ -6,12 +6,17 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
+        <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+        <span style="margin-left: 1rem;">合计净重:</span>
+        <el-input v-model="totalNetWeight" :disabled="true" style="width: 140px;"></el-input>
+        <span style="margin-left: 1rem;">合计金额:</span>
+        <el-input v-model="totalMoney" :disabled="true" style="width: 100px;"></el-input>
     </div>
     <div class="table">
       <el-tabs v-model="activeName">
         <!-- 未结算 -->
         <el-tab-pane label="未结算" name="first">
-        <dilTable v-bind.sync="options1">
+        <dilTable v-bind.sync="options1" ref="excelDom" @func="func">
         </dilTable>
         </el-tab-pane>
         <!-- 已结算 -->
@@ -21,7 +26,6 @@
         </el-tab-pane>
       </el-tabs>
     </div>
-
   </div>
 </template>
 
@@ -30,6 +34,8 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data(){
     return{
+      totalNetWeight:null,
+      totalMoney:null,
       //单价
       Fee:null,
       //加载
@@ -77,6 +83,15 @@ export default {
      this.options2GetRequestUrl();
   },
   methods:{
+    func(res){
+      console.log(res.list);
+      res.list.forEach(e => {
+        console.log(e.netWeightSecond)
+        this.totalNetWeight = this.totalNetWeight + e.netWeightSecond
+        this.totalMoney = this.totalMoney + e.secondAmount
+        console.log(e.secondAmount);
+      });
+    },
     //未结算数据
     options1GetRequestUrl(){
     if(getCookie("orgCode") == "chengyunshang"){

+ 17 - 3
src/views/inward/components/inwardSettlement/timeDetailsWeight.vue

@@ -6,12 +6,17 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
+    <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+    <span style="margin-left: 1rem;">合计时间:</span>
+      <el-input v-model="totalTime" :disabled="true" style="width: 140px;"></el-input>
+      <span style="margin-left: 1rem;">合计金额:</span>
+      <el-input v-model="totalMoney" :disabled="true" style="width: 100px;"></el-input>
     </div>
     <div class="table">
       <el-tabs v-model="activeName">
         <!-- 未结算 -->
         <el-tab-pane label="未结算" name="first">
-        <dilTable v-bind.sync="options1">
+        <dilTable v-bind.sync="options1" ref="excelDom" @func="func">
         </dilTable>
         </el-tab-pane>
         <!-- 已结算 -->
@@ -30,6 +35,8 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data(){
     return{
+      totalMoney:null,
+      totalTime:null,
       //单价
       Fee:null,
       //加载
@@ -69,7 +76,8 @@ export default {
       // addressText:null,
       //缓存当前选中的运输单价
       priceMap:{},
-      formLabelWidth: '125px'
+      formLabelWidth: '125px',
+      tableTitle:'内转计时计费详单'
     }
   },
   created(){
@@ -102,7 +110,13 @@ export default {
      toInsert() {
       this.$router.push("/insertCheckInventory");
     },
-
+    func(res){
+      console.log(res);
+      res.list.forEach(e => {
+        this.totalTime = this.totalTime + e.resultTime
+        this.totalMoney = this.totalMoney + e.detailsAmount
+      });
+    },
     onclick(){
       console.log("查询待定值")
       // this.options.requestUrl = "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=1&con="+this.input;