huk 3 年之前
父節點
當前提交
de52cef140

+ 2 - 2
build/utils.js

@@ -15,9 +15,9 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 // ['index','appoint','configManager','homepage','inward','queue','RMS','sale','serviceManager','SporadicManage'
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
-// let devModules = ['all'];
+let devModules = ['all'];
 // let devModules = ['index','statisticalReport','appoint','RMS','TMS'];
-let devModules = ['index'];
+// let devModules = ['index'];
 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:8080",
-    // target: "http://172.16.33.162:8019",
-    // target: "http://192.168.1.101:8019",
+    // target: "http://192.168.1.102:8019",
+    // target: "http://localhost:8019",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 9 - 8
src/components/DilCommonUI/packages/table/src/table.js

@@ -25,6 +25,11 @@ export default {
     };
   },
   created() {
+    if(this.isHeigth){
+      window.addEventListener('resize',this.getHeight)
+      this.getHeight();
+    }
+    
     this.dataCurrentPage = this.currentPage;
     this.dataPageSize = this.pageSize;
     this.requestData();
@@ -36,6 +41,9 @@ export default {
     // this.columnDrop();
   },
   methods: {
+    getHeight(){
+      this.height = window.innerHeight - this.shiyHeigth;
+    },
     //计算合计列
     getSummaries(columns,data) {
       const sums = [];
@@ -54,7 +62,7 @@ export default {
             sums[index];
            }
       });
-      console.log("净重:" + sums)
+      // console.log("净重:" + sums)
       return sums
       },
     // 通过请求获取数据
@@ -127,13 +135,6 @@ export default {
               this.$emit('func',response.data.data);
               this.refreshColumnData(d.columnData);
               this.isShow = true;
-              
-              //若父组件存在要合计的值
-              if(this.$parent.totalNumber>=0){
-                //将筛选的字段传给父组件
-                this.$parent.calculationTotalNumber(this.dataRequestQuery);
-              }
-              return d.columnData
             });
         }
       } else {

+ 6 - 3
src/components/DilCommonUI/packages/table/src/table.vue

@@ -10,7 +10,6 @@
       :row-class-name="rowClassName"
       :cell-class-name="cellClassName"
       :height="height"
-      :max-height="maxHeight"
       :highlight-current-row="highlightCurrentRow"
       @sort-change="sortChange"
       @selection-change="selectionChange"
@@ -19,7 +18,8 @@
       v-loading="loading"
       element-loading-text="玩命加载中"
       element-loading-spinner="el-icon-loading"
-      :show-summary="summary"
+      :isHeigth="isHeigth"
+      :shiyHeigth="shiyHeigth"
     >
       <!-- 多选列 -->
       <el-table-column
@@ -120,7 +120,10 @@ export default {
   name: "DilTable",
   extends: table,
   props: {
-    summary:{
+    shiyHeigth:{
+      default:null,
+    },
+    isHeigth:{
       default:false,
     },
     drawer:{

+ 1 - 1
src/views/RMS/components/addCapacity.vue

@@ -97,7 +97,7 @@ export default {
           if (res.data.code == "200") {
             console.log(res.data.data);
             var restaurants = res.data.data;
-            console.log(restaurants, "restaurants");
+            // console.log(restaurants, "restaurants");
             var results = queryString
               ? restaurants.filter(this.createFilter(queryString))
               : restaurants;

+ 1 - 1
src/views/TMS/components/purchaseChemicalMaterials/transportationReservationAdd.vue

@@ -419,7 +419,7 @@ export default {
     },
     // 返回
     onClickCancel() {
-      this.$router.push("/transportReserveRan");
+      this.$router.push("/transportationReservation");
     },
     currentRadioChange1(selection) {
       this.materialName = selection.materialName;

+ 128 - 20
src/views/appoint/components/saleContract/addTransportPrice.vue

@@ -9,9 +9,29 @@
       <div class="liulan">
           <el-button type="primary" class="btn" @click="lineClick">浏览</el-button>
           <el-button type="primary" class="btn1" @click="addressClick">浏览</el-button>
-          <el-button type="primary" class="btn2">浏览</el-button>
+          <!-- <el-button type="primary" class="btn2">浏览</el-button> -->
       </div>
     </div>
+    <div class="elForm">
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
+        <el-form-item label="所属承运商">
+          <el-autocomplete
+            class="inline-input"
+            v-model="state"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入承运商名称"
+            :trigger-on-focus="false"
+            @select="handleSelect"
+          >
+            <template slot-scope="{ item }">
+              <div class="name" v-if="item.carrierName">
+                {{ item.carrierName }}
+              </div>
+            </template>
+          </el-autocomplete>
+        </el-form-item>
+      </el-form>
+    </div>
     <div class="button_box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
@@ -79,16 +99,23 @@
 
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
   data() {
     return {
+      //承运商名称
+      state: null,
+      //承运商id
+      carrierIds: null,
       //是否打开收货地址模态框
       addresDrawer:false,
       //收货地址查询条件
       addresText:null,
+      //收货地址id
+      addressId:null,
       //收货地址模态框数据
+      addressDetailed :null,
       addres:{
         requestUrl:"",
         selectionType: "radio",
@@ -102,6 +129,8 @@ export default {
       LineDrawer:false,
       //线路查询条件
       LineText:null,
+      //线路Id
+      lineId:null,
       //线路模态框查询按钮状态
       selectLineLoading:false,
       //线路模态窗口的数据
@@ -114,9 +143,10 @@ export default {
       //表单数据
       form1: {
         priceDate:new Date(),
+        oilTypeId:10,
       },
       //提交给后端的数据
-      map:{},
+      // map:{},
       ops: {
         vuescroll: {},
         scrollPanel: {},
@@ -133,6 +163,21 @@ export default {
       }
     };
   },
+  mounted() {
+    this.axios
+      .post(
+        "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
+      )
+      .then((res) => {
+        if (res.data.code == "200") {
+          console.log(res.data.data);
+          if (res.data.data) {
+            this.state = res.data.data.carrierName;
+            this.carrierIds = res.data.data.carrierId;
+          }
+        }
+      });
+  },
   methods: {
     func(res){
         this.selectLineLoading = false;
@@ -159,33 +204,70 @@ export default {
         this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&i=" + new Date();
       }
     },
+    //承运商弹出层
+    handleSelect(item) {
+      this.carrierIds = item.carrierId;
+      item.carrierName = this.state;
+    },
+    //以下是承运商边输边查搜索
+    querySearch(queryString, cb) {
+      this.axios
+        .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+        .then((res) => {
+          if (res.data.code == "200") {
+            console.log(res.data.data);
+            var restaurants = res.data.data;
+            // console.log(restaurants, "restaurants");
+            var results = queryString
+              ? restaurants.filter(this.createFilter(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以上是承运商边输边查搜索
     currentRadioChange(val){
       let mapvalue = {
-        shipperId:this.form1.shipperId,
+        shipperId : this.form1.shipperId,
         lineName:val.lineName,
-        carrierId:this.form1.carrierId,
+        capacityTypeId : this.form1.capacityTypeId,
+        cargonameId : this.form1.cargonameId,
+        priceValue : this.form1.priceValue,
+        priceDate : this.form1.priceDate,
         addressName:this.form1.addressName,
-        priceValue:this.form1.priceValue,
-        materialId:this.form1.materialId,
-        type:this.form1.type,
-        priceDate:this.form1.priceDate,
+        type : this.form1.type,
+        oilpriceBase : this.form1.oilpriceBase,
+        oilTypeId : this.form1.oilTypeId,
+        oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold
       }
-      this.form1 = mapvalue
-      this.map.lineId = val.lineId;
+      this.form1 = mapvalue;
+      this.lineId = val.lineId;
     },
     currentRadioChange1(val){
       let mapvalue = {
-        shipperId:this.form1.shipperId,
+        shipperId : this.form1.shipperId,
         lineName:this.form1.lineName,
-        carrierId:this.form1.carrierId,
+        capacityTypeId : this.form1.capacityTypeId,
+        cargonameId : this.form1.cargonameId,
+        priceValue : this.form1.priceValue,
+        priceDate : this.form1.priceDate,
         addressName:val.address,
-        priceValue:this.form1.priceValue,
-        materialId:this.form1.materialId,
-        type:this.form1.type,
-        priceDate:this.form1.priceDate,
+        type : this.form1.type,
+        oilpriceBase : this.form1.oilpriceBase,
+        oilTypeId : this.form1.oilTypeId,
+        oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold
       }
-      this.form1 = mapvalue
-      this.map.addressId = val.addressId;
+      this.form1 = mapvalue;
+      this.addressId = val.addressId;
     },
     //打开线路的模态窗口
     lineClick(){
@@ -208,7 +290,30 @@ export default {
       }
     },
     makeSure() {
-      
+      let amsContractTransportPrice={
+        shipperId : this.form1.shipperId,
+        carrierId : this.carrierIds,
+        lineId : this.lineId,
+        capacityTypeId : this.form1.capacityTypeId,
+        cargonameId : this.form1.cargonameId,
+        priceValue : this.form1.priceValue,
+        priceDate : sjTime(this.form1.priceDate),
+        addressId : this.addressId,
+        type : this.form1.type,
+        oilpriceBase : this.form1.oilpriceBase,
+        oilTypeId : this.form1.oilTypeId,
+        oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold
+      }
+      // console.log("amsContractTransportPrice",amsContractTransportPrice)
+      this.axios.post("/api/v1/ams/addAmsContractTransportPrice", amsContractTransportPrice).then((res) => {
+          if (res.data.code == "200") {
+            this.$router.go(-1);
+          }
+          this.$message({
+            type: "success",
+            message: "新增运输单价成功!",
+          });
+        });   
     },
     // 取消
     cancel() {
@@ -218,6 +323,9 @@ export default {
 };
 </script>
 <style lang='scss'>
+.elForm {
+    margin-left: 30%;
+  }
 .addTransportPrice{
   .form{
     display: flex;

+ 34 - 57
src/views/appoint/components/saleContract/transportPrice.vue

@@ -12,7 +12,7 @@
        <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
     </div>
     <dilTable ref="excelDom" v-bind.sync="option" :loading="loading" :isKuang="isKuang" @func="func">
-      <el-table-column fixed="right" label="操作" width="200">
+      <!-- <el-table-column fixed="right" label="操作" width="200">
         <template slot-scope="scope">
           <el-button @click="click(scope.row.priceId)" type="text" size="small"
             >修改</el-button
@@ -24,7 +24,7 @@
             >删除</el-button
           >
         </template>
-      </el-table-column>
+      </el-table-column> -->
     </dilTable>
   </div>
 </template>
@@ -61,62 +61,39 @@ export default {
     btnclick() {
       this.$router.push("/addTransportPrice");
     },
-    click(priceId) {
-      this.$router.push("/editTransportPrice/" + priceId);
-    },
-    deleteclick(scope) {
-      let priceId = scope;
-      this.$confirm("是否删除", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-        .then(() => {
-          this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
-          this.axios
-            .post(
-              "/api/v1/ams/deleteAmsContractTransportPrice1?priceId=" +
-                priceId
-            )
-            .then((res) => {
-              if (res.data.code == "200") {
-                this.$router.go(0);
-              }
-            });
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "取消删除!",
-          });
-        });
-    },
-    // exportData(){
-    //     let tHeader = [];
-    //     let filterVal = [];
-    //     this.$refs.tab.dataColumnData.filter( (item,i) =>{
-    //       tHeader.push(item.label);
-    //           filterVal.push(item.prop);
-    //       } )
-    //     this.export2Excel(tHeader,filterVal,this.$refs.tab.dataTabel);
-    // },
-    //  export2Excel(tHeader,filterVal,dataTabel) {
-    //   var that = this;
-    //    this.downloadLoading = true
-    //   require.ensure([], () => {
-    //     const { export_json_to_excel } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
-    //     let list = dataTabel;
-    //     let data = that.formatJson(filterVal, list);
-    //     export_json_to_excel(tHeader, data, "汽运单价"); // 导出的表格名称
-    //   });
+    // click(priceId) {
+    //   this.$router.push("/editTransportPrice/" + priceId);
     // },
-    // //3.格式转换
-    // formatJson(filterVal, jsonData) {
-    //   return jsonData.map((v) => filterVal.map((j) => v[j]));
+    // deleteclick(scope) {
+    //   let priceId = scope;
+    //   this.$confirm("是否删除", "提示", {
+    //     confirmButtonText: "确定",
+    //     cancelButtonText: "取消",
+    //     type: "warning",
+    //     center: true,
+    //   })
+    //     .then(() => {
+    //       this.$message({
+    //         type: "success",
+    //         message: "删除成功!",
+    //       });
+    //       this.axios
+    //         .post(
+    //           "/api/v1/ams/deleteAmsContractTransportPrice1?priceId=" +
+    //             priceId
+    //         )
+    //         .then((res) => {
+    //           if (res.data.code == "200") {
+    //             this.$router.go(0);
+    //           }
+    //         });
+    //     })
+    //     .catch(() => {
+    //       this.$message({
+    //         type: "info",
+    //         message: "取消删除!",
+    //       });
+    //     });
     // },
   },
   

+ 38 - 25
src/views/statisticalReport/components/salesLogisticsStatistics/transportationPerformance.vue

@@ -34,7 +34,7 @@
       <el-input v-model="totalCapacity" :disabled="true" style="width: 150px;"></el-input>
     </div>
     <div class="table">
-      <dilTable ref="excelDom" v-bind.sync="option" :isKuang="isKuang" @func="func" :pageSize = "pageSize"></dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option" :isHeigth="isHeigth" :shiyHeigth="shiyHeigth" :isKuang="isKuang" @func="func" @requestQuery="requestQuery" :pageSize = "pageSize"></dilTable>
     </div>
   </div>
 </template>
@@ -44,6 +44,8 @@ import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
+      shiyHeigth:140,
+      isHeigth:true,
       pageSize:100,
       isKuang:false,
       option: {
@@ -69,10 +71,21 @@ export default {
       this.$router.go(0);
     },
     func(res){
-      //获取总记录条数作为合计车数
+      console.log(res)
+      var resultNetWeightTotal = 0
+      res.list.forEach(e => {
+        resultNetWeightTotal = resultNetWeightTotal+e.resultNetWeight
+      });
+      this.totalNumber = resultNetWeightTotal.toFixed(2) + " t"
       this.totalCapacity = res.total;
+      //获取总记录条数作为合计车数
+      // this.totalCapacity = res.total;
       this.isKuang = false;
     },
+    // requestQuery(q){
+    //   //调用获取总净重方法
+    //   this.calculationTotalNumber(q);
+    // },
     onclick() {
       let startTime = null;
       let endTime = null;
@@ -91,32 +104,32 @@ export default {
         this.option.requestUrl = "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
       }
     },
-    //获取当前条件下的总净重
-    calculationTotalNumber(dataRequestQuery){
-      //初始化时间
-      let startTime = null;
-      let endTime = null;
-      if(this.Time != null){
-        startTime = sjTime(this.Time[0]);
-        endTime = sjTime(this.Time[1]);
-      }
-      //放入子组件筛选的值
-      let mapValue = undefined;
-          for (const key in dataRequestQuery) {
+    // //获取当前条件下的总净重
+    // calculationTotalNumber(dataRequestQuery){
+    //   //初始化时间
+    //   let startTime = null;
+    //   let endTime = null;
+    //   if(this.Time != null){
+    //     startTime = sjTime(this.Time[0]);
+    //     endTime = sjTime(this.Time[1]);
+    //   }
+    //   //放入子组件筛选的值
+    //   let mapValue = undefined;
+    //       for (const key in dataRequestQuery) {
          
-            const val = dataRequestQuery[key];
-            if (val||val==0) {
+    //         const val = dataRequestQuery[key];
+    //         if (val||val==0) {
              
-              if (!mapValue) mapValue = {};
+    //           if (!mapValue) mapValue = {};
             
-              mapValue[key] = val;
-            }
-          }
-      this.axios.post("/api/v1/tms/getAllSaleReportTotal?startTime=" + startTime +"&endTime="+ endTime +"&i=" +new Date(),mapValue)
-      .then((res) => {
-          this.totalNumber = res.data.data;
-        });  
-    },
+    //           mapValue[key] = val;
+    //         }
+    //       }
+    //   this.axios.post("/api/v1/tms/getAllSaleReportTotal?startTime=" + startTime +"&endTime="+ endTime +"&i=" +new Date(),mapValue)
+    //   .then((res) => {
+    //       this.totalNumber = res.data.data;
+    //     });  
+    // },
     //格式化日期
     dataFormat(value){
       let date = new Date(value);