luobang 3 vuotta sitten
vanhempi
commit
d59bf3ff1d

+ 1 - 1
.eslintrc.js

@@ -57,6 +57,6 @@ module.exports = {
     'no-dupe-args': 2,
     // 不能有声明后未被使用的变量或参数
     'no-unused-vars': 0,
-    'space-before-function-paren': 0
+    'space-before-function-paren': 0,
   }
 };

+ 1 - 1
build/utils.js

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

+ 1 - 1
config/index.js

@@ -73,7 +73,7 @@ let proxyTable = {
     }
   },
   "/views/api/v1": {
-    target: "http://172.16.33.166:8080",
+    // target: "http://172.16.33.166:8080",
     // target: "http://192.168.1.109:8080",
     ws: true,
     pathRewrite: {

+ 290 - 0
src/views/inward/components/inwardSettlement/inwardAllDetailsOrder.vue

@@ -0,0 +1,290 @@
+// 计费详单
+<template>
+  <div class="steel_inbound">
+    <div class="sache">
+      <span>详单时间:</span>
+      <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-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" tab-click="handClick">
+        <!-- 未结算 -->
+        <el-tab-pane label="未结算" name="first">
+          <div class="table">
+            <dilTable
+              v-bind.sync="options1"
+              ref="excelDom"
+              @func="func"
+            ></dilTable>
+          </div>
+        </el-tab-pane>
+        <!-- 已结算 -->
+        <el-tab-pane label="已结算" name="second">
+          <dilTable v-bind.sync="options2"> </dilTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
+export default {
+  data() {
+    return {
+      startTime: null,
+      endTime: null,
+      //合计净重
+      totalNetWeight: null,
+      //合计金额
+      totalMoney: null,
+      //单价
+      Fee: null,
+      //加载
+      selectLineLoading: false,
+      input: "",
+      activeName: "first",
+      ssoId: null,
+      //详单Id
+      detailsId: null,
+      options1: {
+        // first请求数据的地址
+        requestUrl: ""
+      },
+      options2: {
+        // second请求数据的地址
+        requestUrl: ""
+      },
+      //是否打开修改详单地址弹出框
+      dialogFormVisible: false,
+      //原详单单价
+      originalPriceValue: null,
+      //新详单单价
+      newPriceValue: null,
+      //原详单地址
+      originalAddress: null,
+      //新详单地址
+      newAddress: null,
+      //新单价Id
+      priceId: null,
+      //是否打开运输单价的模态框
+      addressDrawer: false,
+      //运输单价的表格
+      Address: {
+        requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
+        selectionType: "radio"
+      },
+      // addressText:null,
+      //缓存当前选中的运输单价
+      priceMap: {},
+      formLabelWidth: "125px",
+      tableTitle: "内转计重详单"
+    };
+  },
+  created() {
+    this.options1GetRequestUrl();
+    this.options2GetRequestUrl();
+  },
+  methods: {
+    func(res) {
+      console.log(res.list);
+      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) + "元";
+    },
+    //未结算数据
+    options1GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.ssoId = getCookie("userId");
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=0&carrierSsoId=" +
+          getCookie("userId") +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      } else if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=0&startTime=null&endTime=null&i=" +
+          new Date();
+      } else {
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=0&userId=" +
+          getCookie("orgCode") +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      }
+    },
+    //已结算数据
+    options2GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.ssoId = getCookie("userId");
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=1&carrierSsoId=" +
+          getCookie("userId") +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      } else if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=1" +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      } else {
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=1&userId=" +
+          getCookie("orgCode") +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      }
+    },
+    toInsert() {
+      this.$router.push("/insertCheckInventory");
+    },
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          if (
+            getCookie("orgCode") == "dagangadmin" ||
+            getCookie("orgCode") == "zidonghuabu" ||
+            getCookie("orgCode") == "wuliuchuyunzhongxin"
+          ) {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=0" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=1" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+          } else if (getCookie("orgCode") == "chengyunshang") {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=0&carrierSsoId=" +
+              getCookie("userId") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=1&carrierSsoId=" +
+              getCookie("userId") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+          } else {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=0&userId=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=1&userId=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+          }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+      }
+    },
+    //运输订单点击浏览的事件
+    select() {
+      this.addressDrawer = true;
+    },
+    //运输单价模态窗口的框计算
+    selectAddressClick() {
+      this.Price.requestUrl =
+        "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
+        this.addressText;
+    }
+  }
+};
+</script>
+
+<style lang="scss" scode>
+.steel_inbound {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+}
+</style>

+ 3 - 1
src/views/inward/router/index.js

@@ -160,7 +160,8 @@ import inwardPurDetailsOrders from '../components/inwardSettlement/purInwardDeta
 import inwardTimeDetailsOrders from '../components/inwardSettlement/timeDetailsWeight.vue'
 //内转结算--计数计费详单
 import inwardCountDetailsOrders from '../components/inwardSettlement/countDetailOrder.vue'
-
+//内转结算--计时和计重计费详单
+import  inwardWeightTimeDetailsOrder from '../components/inwardSettlement/inwardAllDetailsOrder.vue'
 
 Vue.use(Router)
 
@@ -251,6 +252,7 @@ const constantRouterMap = [{
     {path: 'inwardCountDetailsOrders',name: 'inwardCountDetailsOrders',meta: {code: 'xtpzgl-yhgl'},component: inwardCountDetailsOrders},
     {path: 'inwardTimeDetailsOrders',name: 'inwardTimeDetailsOrders',meta: {code: 'xtpzgl-yhgl'},component: inwardTimeDetailsOrders},
     {path: 'inwardPurDetailsOrders',name: 'inwardPurDetailsOrders',meta: {code: 'xtpzgl-yhgl'},component: inwardPurDetailsOrders},
+    {path: 'inwardWeightTimeDetailsOrder',name: 'inwardWeightTimeDetailsOrder',meta: {code: 'xtpzgl-yhgl'},component: inwardWeightTimeDetailsOrder},
   ]
 }];