Browse Source

提交计时

胡半仙 3 years ago
parent
commit
60d0e9d70e
71 changed files with 7011 additions and 1022 deletions
  1. 7 5
      build/utils.js
  2. 2 6
      config/index.js
  3. BIN
      dist.rar
  4. 9 2
      package.json
  5. BIN
      src/assets/img/smallcar.png
  6. BIN
      src/assets/loading_images/loading.gif
  7. 31 14
      src/components/DilCommonUI/packages/table/src/table.vue
  8. 20 0
      src/components/OffFactoryMapShow/index.js
  9. 279 0
      src/components/OffFactoryMapShow/packages/src/GAODEMap.js
  10. 144 0
      src/components/OffFactoryMapShow/packages/src/GAODEMap.vue
  11. 214 0
      src/components/OffFactoryMapShow/packages/src/README.md
  12. 91 0
      src/views/RMS/components/addCapacity.vue
  13. 6 6
      src/views/RMS/components/addCarrier.vue
  14. 10 0
      src/views/RMS/components/capacity.vue
  15. 252 0
      src/views/RMS/components/showCapacity.vue
  16. 10 7
      src/views/RMS/components/showCarrier.vue
  17. 4 2
      src/views/RMS/router/index.js
  18. 26 9
      src/views/TMS/components/bmsport/addHandlingFee.vue
  19. 6 4
      src/views/TMS/components/bmsport/handlingFee.vue
  20. 1 6
      src/views/TMS/components/bmsport/updateHandlingFee.vue
  21. 41 42
      src/views/TMS/components/domesticMine/approveWagonPleaseAdd.vue
  22. 4 3
      src/views/TMS/components/domesticMine/wagonLoadAdd.vue
  23. 2 0
      src/views/TMS/components/domesticMine/wagonLoadMine.vue
  24. 1 1
      src/views/TMS/components/domesticMine/wagonLoadbu.vue
  25. 94 27
      src/views/TMS/components/domesticMine/wagonPleaseAdd.vue
  26. 0 1
      src/views/TMS/components/domesticMine/wagonPleaseMine.vue
  27. 20 17
      src/views/TMS/components/domesticMine/wagonUnLoadAdd.vue
  28. 8 13
      src/views/TMS/components/importedEmergency/addWagonLoadEmergency.vue
  29. 2 8
      src/views/TMS/components/importedEmergency/addWagonUnLoadEmergency.vue
  30. 1 1
      src/views/TMS/components/importedEmergency/entrustEmergency.vue
  31. 3 2
      src/views/TMS/components/importedEmergency/wagonUnLoadEmergency.vue
  32. 3 3
      src/views/TMS/components/importedFuel/truckDriverReceiveRan.vue
  33. 3 3
      src/views/TMS/components/importedIngredients/truckDriverReceiveFu.vue
  34. 0 6
      src/views/TMS/components/importedMine/addWagonPlease.vue
  35. 1 1
      src/views/TMS/components/importedMine/wagonApprove.vue
  36. 2 2
      src/views/TMS/router/index.js
  37. 20 9
      src/views/appoint/components/purchase/addOtherPrice.vue
  38. 7 8
      src/views/appoint/components/purchase/otherPrice.vue
  39. 19 6
      src/views/appoint/components/purchase/updateOtherPrice.vue
  40. 1095 217
      src/views/appoint/components/saleContract/addSaleOrder.vue
  41. 2 3
      src/views/appoint/components/saleContract/addSaleOrderSend.vue
  42. 749 0
      src/views/appoint/components/saleContract/addSaleOrderSteelSend.vue
  43. 713 0
      src/views/appoint/components/saleContract/addSaleOrderSteelSendCarrier.vue
  44. 90 79
      src/views/appoint/components/saleContract/addTransportPrice.vue
  45. 29 121
      src/views/appoint/components/saleContract/saleOrder.vue
  46. 4 95
      src/views/appoint/components/saleContract/saleOrderCoproduct.vue
  47. 1 1
      src/views/appoint/components/saleContract/saleOrderCoproductCarrier.vue
  48. 446 0
      src/views/appoint/components/saleContract/saleOrderSteel.vue
  49. 358 0
      src/views/appoint/components/saleContract/saleOrderSteelCar.vue
  50. 185 0
      src/views/appoint/components/saleContract/saleOrderSteelCarrier.vue
  51. 532 0
      src/views/appoint/components/saleContract/saleOrderSteelEmpower.vue
  52. 12 0
      src/views/appoint/router/index.js
  53. 57 11
      src/views/inward/components/inwardSettlement/detailOrder.vue
  54. 51 7
      src/views/inward/components/inwardSettlement/purInwardDetailsOrder.vue
  55. 52 6
      src/views/inward/components/inwardSettlement/timeDetailsWeight.vue
  56. 4 2
      src/views/inward/components/truckAppoint/addRequirement.vue
  57. 3 0
      src/views/inward/components/truckAppoint/addRequirement2.vue
  58. 1 1
      src/views/inward/components/truckAppoint/requirementOther.vue
  59. 9 1
      src/views/inward/components/truckOrder/dispatchPlan.vue
  60. 61 0
      src/views/sale/app.js
  61. 409 0
      src/views/sale/components/offSiteTransportation/inTransit.vue
  62. 497 0
      src/views/sale/components/offSiteTransportation/mapTest.vue
  63. 90 0
      src/views/sale/components/offSiteTransportation/slider.vue
  64. 5 4
      src/views/sale/components/saleSelfMachine/printScan.vue
  65. 59 149
      src/views/sale/components/saleSelfMachine/printWarranty.vue
  66. 1 1
      src/views/sale/components/transport_appointment/openDistributionSection.vue
  67. 96 105
      src/views/sale/components/transport_excute/tms-offsite/arrivalResult.vue
  68. 3 3
      src/views/sale/components/transport_order/receiveOrder.vue
  69. 6 2
      src/views/sale/router/index.js
  70. 46 0
      src/views/statisticalReport/components/defendCapacity/getCapacityByDefend.vue
  71. 2 0
      src/views/statisticalReport/router/index.js

+ 7 - 5
build/utils.js

@@ -15,17 +15,19 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 // ['index','appoint','configManager','homepage',''inward,'queue','RMS','sale','serviceManager','SporadicManage'
 // ['index','appoint','configManager','homepage',''inward,'queue','RMS','sale','serviceManager','SporadicManage'
 //       统计报表       组织机构/系统管理 采购  仓储
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
- let devModules = ['all']
-// let devModules = ['index','inward','appoint']
-// let devModules = ['index','TMS','appoint','statisticalReport']
+let devModules = ['all']
+// let devModules = ['index','appoint','sale','RMS'];
+// let devModules = ['index','appoint','WMS'];
+// let devModules = ['index','inward','SporadicManage']
+// let devModules = ['index','sale','RMS']
 // let devModules = ['index','SporadicManage','RMS','statisticalReport']
 // let devModules = ['index','SporadicManage','RMS','statisticalReport']
-// let devModules = ['index','inward','statisticalReport']
+// let devModules = ['index','inward','statisticalReport','TMS']
 //  let devModules = ['index','WMS','sale','TMS','inward','SporadicManage']
 //  let devModules = ['index','WMS','sale','TMS','inward','SporadicManage']
 // let devModules = ['index','SporadicManage','TMS','statisticalReport','RMS'];
 // let devModules = ['index','SporadicManage','TMS','statisticalReport','RMS'];
 // let devModules = ['index','RMS'];
 // let devModules = ['index','RMS'];
 
 
 
 
-if (pathSrc.indexOf('node_modules') > -1) {
+if (pathSrc.indexOf('node_modules') > -1) {c
     devModules = require('../../../cors.js').devModules;
     devModules = require('../../../cors.js').devModules;
 }
 }
 // 获取入口集合
 // 获取入口集合

+ 2 - 6
config/index.js

@@ -66,18 +66,13 @@ let proxyTable = {
   "/api/v1": {
   "/api/v1": {
     // target: "http://192.168.1.106:8019",
     // target: "http://192.168.1.106:8019",
     target: "http://172.16.33.166:8080",
     target: "http://172.16.33.166:8080",
-    // target: "http://localhost:8019",
-    // target: "http://172.16.33.162:8080",
-    // target: "http://localhost:8080",
-    // target: "http://192.168.1.101:8019",
     ws: true,
     ws: true,
     pathRewrite: {
     pathRewrite: {
       "^/api/v1": "/api/v1"
       "^/api/v1": "/api/v1"
     }
     }
   },
   },
   "/views/api/v1": {
   "/views/api/v1": {
-    // target: "http://localhost:8080",
-     target: "http://172.16.33.166:8080",
+    target: "http://172.16.33.166:8080",
     // target: "http://192.168.1.115:8080",
     // target: "http://192.168.1.115:8080",
     ws: true,
     ws: true,
     pathRewrite: {
     pathRewrite: {
@@ -146,6 +141,7 @@ module.exports = {
     }
     }
   },
   },
 
 
+  
   build: {
   build: {
     // Template for index.html
     // Template for index.html
     index: path.resolve(__dirname, dist + '/index.html'),
     index: path.resolve(__dirname, dist + '/index.html'),

BIN
dist.rar


+ 9 - 2
package.json

@@ -15,7 +15,10 @@
     "testc": "cross-env NODE_ENV=test nyc mocha-webpack --webpack-config build/webpack.test.conf.js --require test/setup.js test/**/*.spec.js"
     "testc": "cross-env NODE_ENV=test nyc mocha-webpack --webpack-config build/webpack.test.conf.js --require test/setup.js test/**/*.spec.js"
   },
   },
   "dependencies": {
   "dependencies": {
+    "@amap/amap-jsapi-loader": "^1.0.1",
     "@antv/g6": "1.2.8",
     "@antv/g6": "1.2.8",
+    "@vue/reactivity": "^3.2.31",
+    "amap-js": "^2.4.0",
     "apollo-cache-inmemory": "^1.5.1",
     "apollo-cache-inmemory": "^1.5.1",
     "apollo-client": "^2.5.1",
     "apollo-client": "^2.5.1",
     "apollo-link": "^1.2.11",
     "apollo-link": "^1.2.11",
@@ -26,7 +29,7 @@
     "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",
-    "element-ui": "2.15.7",
+    "element-ui": "2.13.2",
     "file-saver": "^1.3.8",
     "file-saver": "^1.3.8",
     "graphql": "^14.1.1",
     "graphql": "^14.1.1",
     "graphql-tag": "^2.10.1",
     "graphql-tag": "^2.10.1",
@@ -45,18 +48,22 @@
     "socket.io-stream": "^0.9.1",
     "socket.io-stream": "^0.9.1",
     "sockjs-client": "^1.3.0",
     "sockjs-client": "^1.3.0",
     "uuid": "^3.3.2",
     "uuid": "^3.3.2",
+    "view-design": "^4.7.0",
     "vue": "^2.5.2",
     "vue": "^2.5.2",
+    "vue-amap": "^0.5.10",
     "vue-apollo": "^3.0.0-beta.28",
     "vue-apollo": "^3.0.0-beta.28",
     "vue-baidu-map": "^0.21.19",
     "vue-baidu-map": "^0.21.19",
     "vue-clipboard2": "^0.2.1",
     "vue-clipboard2": "^0.2.1",
     "vue-element-bigdata-table": "^1.3.1",
     "vue-element-bigdata-table": "^1.3.1",
+    "vue-print-nb": "^1.7.5",
     "vue-property-decorator": "^8.2.1",
     "vue-property-decorator": "^8.2.1",
     "vue-quill-editor": "^3.0.5",
     "vue-quill-editor": "^3.0.5",
     "vue-router": "^3.0.1",
     "vue-router": "^3.0.1",
+    "vue-social-share": "0.0.3",
     "vue-splitpane": "^1.0.2",
     "vue-splitpane": "^1.0.2",
     "vuescroll": "^4.17.3",
     "vuescroll": "^4.17.3",
     "vuex": "^3.0.1",
     "vuex": "^3.0.1",
-    "vxe-table": "^4.2.2-beta.1",
+    "vxe-table": "^3.5.2",
     "x2js": "^3.3.0",
     "x2js": "^3.3.0",
     "xe-utils": "^3.5.4",
     "xe-utils": "^3.5.4",
     "xlsx": "^0.18.4",
     "xlsx": "^0.18.4",

BIN
src/assets/img/smallcar.png


BIN
src/assets/loading_images/loading.gif


+ 31 - 14
src/components/DilCommonUI/packages/table/src/table.vue

@@ -7,7 +7,6 @@
       row-key="ROW_ID"
       row-key="ROW_ID"
       :stripe="stripe"
       :stripe="stripe"
       :border="border"
       :border="border"
-      :row-class-name="rowClassName"
       :cell-class-name="cellClassName"
       :cell-class-name="cellClassName"
       :height="height"
       :height="height"
       :highlight-current-row="highlightCurrentRow"
       :highlight-current-row="highlightCurrentRow"
@@ -200,11 +199,11 @@ export default {
       default: true,
       default: true,
     },
     },
     // 行的 className 的回调方法,也可以使用字符串为所有行设置一个固定的 className。
     // 行的 className 的回调方法,也可以使用字符串为所有行设置一个固定的 className。
-    rowClassName: {
-      default() {
-        return ({ row, rowIndex }) => "";
-      },
-    },
+    // rowClassName: {
+    //   default() {
+    //     return ({ row, rowIndex }) => "";
+    //   },
+    // },
     // 单元格的 className 的回调方法,也可以使用字符串为所有单元格设置一个固定的 className。
     // 单元格的 className 的回调方法,也可以使用字符串为所有单元格设置一个固定的 className。
     cellClassName: {
     cellClassName: {
       default() {
       default() {
@@ -268,18 +267,36 @@ export default {
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-@media print {
-  .el-pagination {
-    display: none;
+
+.el-table .warning-row {
+    background: #fff ;
+    font-size: 22px;
+    height: 44px;
+    line-height: 46px;
+    font-size: 22px;
+    font-weight: 700;
   }
   }
-  
-}
- /deep/.el-table .success-row {
-    background: #fff !important;
-    color: #f56c6c;
+
+  .el-table .success-row {
+    background: #fff ;
+    font-size: 22px;
     height: 44px;
     height: 44px;
     line-height: 46px;
     line-height: 46px;
     font-size: 22px;
     font-size: 22px;
     font-weight: 700;
     font-weight: 700;
   }
   }
+@media print {
+  .el-pagination {
+    display: none;
+  }
+  
+}
+//  /deep/.el-table .success-row {
+//     background: #fff !important;
+//     color: #f56c6c;
+//     height: 44px;
+//     line-height: 46px;
+//     font-size: 22px;
+//     font-weight: 700;
+//   }
 </style>
 </style>

+ 20 - 0
src/components/OffFactoryMapShow/index.js

@@ -0,0 +1,20 @@
+import GAODEMap from "./packages/src/GAODEMap.js";
+
+
+const components = [GAODEMap];
+
+const install = function(Vue) {
+  components.forEach(component => {
+    Vue.component(component.name, component);
+  });
+};
+
+if (typeof window !== "undefined" && window.Vue) {
+  install(window.Vue);
+}
+
+export default {
+  version: "0.1.0",
+  install,
+  GAODEMap
+};

+ 279 - 0
src/components/OffFactoryMapShow/packages/src/GAODEMap.js

@@ -0,0 +1,279 @@
+
+import { Loading } from 'element-ui';
+
+export default {
+props:{
+    orderNumber:'',
+    capacityNumber:'',
+},
+data() {
+    return {
+        loading : null,
+       
+    };
+},
+watch:{
+    orderNumber:{
+         deep: true,
+        handler(val, oldVal) {
+            console.log("111111111234646")
+            this.reloadData();
+        }
+    }
+},
+created(){
+  
+     this.reloadData();
+},
+mounted: function () {
+             
+        },
+methods: {
+    startLoading (){
+        this.loading = Loading.service({ lock: true, text: '加载中……', background: 'rgba(0, 0, 0, 0.7)' });
+    },
+    reloadData() {
+        let resultData = {
+            orderNumber: this.orderNumber,
+        };
+        this.startLoading(this.orderNumber);
+        console.log()
+        this.$axios.post(
+            "api/v1/getway/fullPathVisualization",resultData
+            ).then((res) => {
+            this.loading.close(); 
+            if(res.data.startAndEndRoutes!=null){
+                this.initMap(res.data);
+
+            
+            }else{
+                this.$message('车辆未入网或没有开启定位,不能访问');
+                this.newMap();
+            }
+            
+            
+        })
+        .catch(error => {
+                this.loading.close(); 
+               
+            if((error+"").indexOf("500") !== -1){
+                    this.$message('车辆未入网或没有开启定位,不能访问');
+                    this.newMap();
+            }
+                    
+                    
+            
+            });
+        
+        
+            
+        },
+        newMap(){
+                var currentPointLat='32.483276';
+                var currentPointLon='114.03629';
+                this.map = new AMap.Map('container', {
+                    zoom:11,//级别
+                    center: [currentPointLon,currentPointLat],//中心点坐标
+                    viewMode:'3D'//使用3D视图
+                });
+                var content = [
+                        "<div  style='top:1px;width: 180px; background-color: rgba(0, 0, 0, 1);' ><b>"+this.capacityNumber+")</b>",
+                        "<div style='background-color:rgba(255, 255, 255, 0.5);'>提示 :"+'GPS没有开启'+"</div></div>"
+                
+                ];
+
+                // 创建 infoWindow 实例	
+                var infoWindow = new AMap.InfoWindow({
+                content: content.join("<br>")  //传入 dom 对象,或者 html 字符串
+                });
+                
+                // 打开信息窗体
+                infoWindow.open(this.map,[currentPointLon,currentPointLat]);
+               
+               
+        },
+        //startLonlat=114.03629,32.483276
+        initMap(data) {
+            console.log(1)
+                var currentPointLat='32.483276';
+                var currentPointLon='114.03629';
+                var polyline=[];
+                //初始化地图
+                if (data.startAndEndRoutes[0].currentPoint!=null){
+                    currentPointLat=data.startAndEndRoutes[0].currentPoint.lat;
+                    currentPointLon=data.startAndEndRoutes[0].currentPoint.lon;
+                }
+                
+            
+            
+                this.map = new AMap.Map('container', {
+                    zoom:11,//级别
+                    center: [currentPointLon,currentPointLat],//中心点坐标
+                    viewMode:'3D'//使用3D视图
+                });
+                var limeList= [];
+            
+                data.startAndEndRoutes.forEach((element,index) => {
+                    
+                    var startPaths=[];
+                    element.runRoute.forEach((element,index) => {
+                        var path= [element.lon,element.lat];
+                        startPaths.push(path);
+                    });
+                
+                    var endPaths=[];
+                    if(element.estimateRoute!=null){
+                        element.estimateRoute.forEach((element,index) => {
+                        var path= [element.lon,element.lat]
+                        endPaths.push(path);
+                    });
+                    }
+                    if (element.startPoint!=null){
+                    
+                        //当前点图标标记点
+                        let startPointicon = new AMap.Icon({
+                            size: new AMap.Size(25, 35), // 图标尺寸
+                            image: require('@/assets/img/start.png'), // Icon的图像
+                            imageOffset: new AMap.Pixel(0,0), // 图像相对展示区域的偏移量,适于雪碧图等
+                            imageSize: new AMap.Size(25, 35) // 根据所设置的大小拉伸或压缩图片
+                        });
+                        // 创建一个 Marker 实例:
+                        var startPointmarker = new AMap.Marker({
+                            position: new AMap.LngLat(element.startPoint.lon, element.startPoint.lat),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+                                icon: startPointicon, 
+                            title: '北京'
+                        });
+                        // 将创建的点标记添加到已有的地图实例:
+                        this.map.add(startPointmarker);
+                    }
+            
+
+
+
+                
+        
+
+                    
+            
+                    //终点
+                    if (element.endPoint!=null){
+
+                        //当前点图标标记点
+                        let endPointicon = new AMap.Icon({
+                            size: new AMap.Size(25, 35), // 图标尺寸
+                            image: require('@/assets/img/end.png'), // Icon的图像
+                            imageOffset: new AMap.Pixel(0,0), // 图像相对展示区域的偏移量,适于雪碧图等
+                            imageSize: new AMap.Size(25, 35) // 根据所设置的大小拉伸或压缩图片
+                        });
+                        // 创建一个 Marker 实例:
+                        var endPointmarker = new AMap.Marker({
+                            position: new AMap.LngLat(element.endPoint.lon, element.endPoint.lat),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+                                icon: endPointicon, 
+                            title: '北京'
+                        });
+
+                        // 将创建的点标记添加到已有的地图实例:
+                        this.map.add(endPointmarker);
+                    }
+                    
+                
+                //已行驶轨迹
+                    if(startPaths.length>0){
+                    
+                        var startLine = new AMap.Polyline({
+                            map:this.map,
+                            path: startPaths,
+                            isOutline: true,
+                            outlineColor: '#00FF00',
+                            borderWeight: 0,
+                            strokeColor: "#00FF00", 
+                            strokeOpacity: 1,
+                            strokeWeight: 5,
+                            // 折线样式还支持 'dashed'
+                            strokeStyle: "solid",
+                            // strokeStyle是dashed时有效
+                            strokeDasharray: [10, 5],
+                            lineJoin: 'round',
+                            lineCap: 'round',
+                            zIndex: 50,
+                        })
+                        
+                        limeList.push(startLine);
+                        
+                    }
+
+                if(endPaths.length>0){
+                    
+                        //预计轨迹
+                    
+                        var endLine = new AMap.Polyline({
+                            map:this.map,
+                            path: endPaths,
+                            isOutline: true,
+                            outlineColor: '#FF0000',
+                            borderWeight: 0,
+                            strokeColor: "#FF0000", 
+                            strokeOpacity: 1,
+                            strokeWeight: 5,
+                            // 折线样式还支持 'dashed'
+                            strokeStyle: "solid",
+                            // strokeStyle是dashed时有效
+                            strokeDasharray: [10, 5],
+                            lineJoin: 'round',
+                            lineCap: 'round',
+                            zIndex: 50,
+                        })
+                        limeList.push(endLine);
+                    
+                }
+                    
+                });
+
+                
+                var content = [
+                        "<div  style='top:1px;width: 180px; background-color: rgba(0, 0, 0, 1);' ><font color='white'>"+this.capacityNumber+'('+data.startAndEndRoutes[0].miled+")</font>",
+                        "<div style='background-color:rgba(255, 255, 255, 0.5);'><font color='white'>地址 :"+data.startAndEndRoutes[0].currentPointName+"</font></div></div>"
+                
+                ];
+                data.startAndEndRoutes.forEach((element,index) => {
+                        // 创建 infoWindow 实例	
+                        var infoWindow = new AMap.InfoWindow({
+                        content: content.join("<br>")  //传入 dom 对象,或者 html 字符串
+                        });
+                      
+
+                       //当前点图标标记点
+                    let currentPointicon = new AMap.Icon({
+                        size: new AMap.Size(40, 40), // 图标尺寸
+                        image: require('@/assets/img/car1.png'), // Icon的图像
+                        imageOffset: new AMap.Pixel(0,0), // 图像相对展示区域的偏移量,适于雪碧图等
+                        imageSize: new AMap.Size(40, 40) // 根据所设置的大小拉伸或压缩图片
+                    });
+                    // 创建一个 Marker 实例:
+                    var currentPointmarker = new AMap.Marker({
+                        position: new AMap.LngLat(element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+                            icon: currentPointicon, 
+                        title: '北京'
+                    });
+
+                    // 将创建的点标记添加到已有的地图实例:
+                    this.map.add(currentPointmarker);
+                        // 打开信息窗体
+                        infoWindow.open(this.map,[element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat]);
+                });
+                
+            
+                this.map.setFitView([ limeList ])
+
+
+
+        
+
+            
+            
+                
+                // 缩放地图到合适的视野级别
+        
+            }
+    }
+};

+ 144 - 0
src/components/OffFactoryMapShow/packages/src/GAODEMap.vue

@@ -0,0 +1,144 @@
+<template>
+    <div id="demo">
+        <el-main id="container" style="position:relative;"></el-main>
+        <!--控制条-->
+        <div class="map-control" v-show="isActual">
+            <!--播放暂停按钮-->
+            <Icon
+                v-if="!isPlay"
+                class="play-icon"
+                type="ios-play"
+                @click="isPlay=true;navgControl('start')"
+            />
+            <Icon v-else class="play-icon" type="ios-pause" @click="isPlay=false;navgControl('pause')"/>
+            <!--已播放时间-->
+            <span class="passed-time">{{passedTime}}</span>
+            <!--进度条-->
+            <el-slider v-model="sliderVal" :format-tooltip="hideFormat" :step="0.0001"></el-slider>
+            <!--倍速-->
+            <div class="map-times" @mouseenter="isTimesChoose=true" @mouseleave="isTimesChoose=false">
+                <div class="times-show">倍速 {{times}}</div>
+                <div class="choose-box">
+                <ul v-show="isTimesChoose">
+                    <li v-for="item in speedList" :key="item.value" :class="{active:times==item.value}" @click="changeSpeed(item.value)">{{item.label}}</li>
+                </ul>
+            </div>
+        </div>
+        <!--结束时间-->
+        <span class="passed-time">{{totalTime}}</span>
+        </div>
+    </div>
+</template>
+
+<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=eed46ea40bbcadbf8a9cdd5dc1a94642"></script>
+<script>
+import GAODEMap from "./GAODEMap.js";
+export default {
+  name: "GAODEMap",
+  extends: GAODEMap,
+  data() {
+        return {
+            //地图展示中心点
+            centerPoint:{
+                pointLat:"",
+                pointLon:""
+            },
+        };
+    },
+}
+</script>
+<style>
+
+#container {
+	width: 100%;
+	height: 100%;
+	overflow: hidden;
+	margin: 0;
+	font-family: "微软雅黑";
+}
+.info_card {
+    display: inline-block;margin: 50px auto;position: absolute;width: 200px;height:150px;background-color: #c7c9c8AA;border: 5px solid #ffffff;color: #000000;
+}
+.info_card .title{
+    width: 100%;
+    height:40px;
+    background-color: #000000AA;
+    color: #ffffff;
+}
+
+.title span.title_name{
+    position: relative;
+    top: 7px;
+    left: 10px;
+    font-size: 18px;
+}
+
+
+.info_card .title .close_img{
+    position: absolute;
+    top:10px;
+    right: 10px;
+    width: 20px;
+    height: 20px;
+    background-color: #ffffff;
+}
+.info_card .title .close_img .min {
+    width: 0;
+    height: 0;
+    font-size:0;
+    overflow:hidden;
+    position:absolute;
+    border-width:10px;
+}
+
+.info_card .title .close_img .top_img {
+    border-style:solid dashed dashed;
+    border-color:#000000 transparent transparent transparent;
+    top:-2px;
+}
+
+.info_card .title .close_img .right_img {
+    border-style:solid dashed dashed;
+    border-color:transparent #000000 transparent transparent;
+    left:2px;
+}
+
+.info_card .title .close_img .bottom_img{
+    border-style:solid dashed dashed;
+    border-color:transparent transparent #000000 transparent;
+    top:2px;
+}
+
+.info_card .title .close_img .left_img{
+    border-style:solid dashed dashed;
+    border-color:transparent transparent transparent #000000;
+    left:-2px;
+}
+
+.info_card span.cancle{
+    width:0;
+    height:0;
+    font-size:0;
+    overflow:hidden;
+    position:absolute;
+}
+
+.info_card span.bot{
+    border-width:20px;
+    border-style:solid dashed dashed;
+    border-color:#ffffff transparent transparent;
+    left:80px;
+    bottom:-40px;
+}
+.info_card span.top{
+    border-width:20px;
+    border-style:solid dashed dashed;
+    border-color:#c7c9c8AA transparent transparent;
+    left:80px;
+    bottom:-33px;
+}
+.info_card .content{
+    margin-top: 10px;
+    margin-left: 10px;
+}
+</style>

+ 214 - 0
src/components/OffFactoryMapShow/packages/src/README.md

@@ -0,0 +1,214 @@
+## 通用表格使用说明
+### 属性说明
+
+
+
+#### requestUrl : string
+
+表格请求的地址
+
+示例:
+
+``` js
+//全地址
+requestUrl:http://192.168.10.113:8081/api/v1/truck/type/status2;
+//后半截地址
+requestUrl:/api/v1/truck/type/status2;
+```
+
+
+
+#### requestQuery : object
+
+表格请求的参数:用于自己触发筛选和排序时使用
+
+可传入参数
+
+
+
+
+
+#### current-page : number
+
+当前页数,支持 .sync 修饰符
+
+默认是第一页
+
+
+
+#### page-size : number
+
+每页显示条目个数,支持 .sync 修饰符
+
+默认是 每页十条
+
+
+
+#### page-sizes : number[]
+
+每页显示个数选择器的选项设置
+
+默认是 [1,2,5,10]
+
+
+
+#### type : string
+
+表格类型:目前支持:base , common
+
+之后会根据需求增加更多的类型
+
+
+
+#### lastColumnData : array[object]
+
+表格最右边列的数据信息,数组中是放一个对象,对象中的属性如下,
+
+基本和Table-column Attributes的相同,
+
+``` js
+lastColumnData:[{
+    // 表头显示的文案
+    label: "操作",
+    // 设置列的宽度
+    width: 100,
+    // 固定操作列
+    fixed: 'right',
+    // 注意!!!
+    // 操作列按钮点击触发的操作改为 $emit 抛事件的形式
+    // 默认可以获取 scope 属性;里面的具体内容和el-table一样
+    template: `
+		<el-button type="text" size="mini" @click="$emit('transportProgress',scope.row)" > 
+			运输进度 
+		</el-button>
+	`,
+}]
+```
+
+
+
+
+
+### 事件说明
+
+#### radio-change(row)
+
+用于当选表格,当用户改变选中行数据时调用,返回选中行的数据对象 **row**
+
+用户再次点击取消选中时,会返回一个**空对象 {}**
+
+
+
+#### selection-change(rows)
+
+用于多选表格,当选择项发生变化时会触发该事件
+
+返回所有被选中的行的数据的数组 rows[]
+
+即使换页,依然保留被选中的数据
+
+
+
+### 方法说明
+
+#### refreshData()
+
+用户主动刷新表格数据
+
+
+
+## 接口相关说明
+
+### 请求参数说明
+
+链接后的参数
+
+``` json
+// 表格头接口的唯一标识
+apiId:13
+// 控制当前显示第几页
+pageNum:1
+// 控制当前每页显示几条
+pageSize:10
+```
+
+请求体的参数
+
+``` json
+// 排序的数据的参数字段
+orderField:""
+// 排序类型 asc : 升序;  desc : 降序;
+orderType:""
+
+// 需要筛选时,键值对的键,是需要筛选的参数的字段名,
+// 键值对的值,是个数组,存放符合条件的字段值,
+// 筛选的字段可以同时存在多条
+[筛选字段名]:[筛选字段值1,筛选字段值2]
+```
+
+
+
+### 回调参数要求
+
+``` json
+{
+    // 状态码 0:标识成功
+    "code": "0",
+    // 后端自定义给前端的数据对象
+    "data": {
+        // 表格的数据源
+        "list": [
+            // 每行表的数据内容
+            {
+                // 每行数据的唯一标识 必设项
+                "ROW_ID":"",
+            }
+        ],
+
+        // 表头的数据内容
+        // 表头按需要的显示顺序排序
+        "columnData": [
+            // 每个表头的相关信息
+            // 这个之后会根据需求不断添加
+            {
+                // 唯一标识 必设项
+                "data_id": "",
+                // 对应列内容的字段名 必设项
+                "prop": "",
+                // 显示的标题 必设项
+                "label": "",
+
+                // 一下为 非必填选项
+                // 自定义列模板
+                // html的字符串
+                // 当有这个属性时,会忽略label属性
+                "template": "",
+
+                // 列的宽度 非必填选项
+                "width": "",
+                // 当前列对应的 筛选功能数组 非必填选项
+                "filters":[
+                    {
+                        // 筛选选项 所对应的后端数值
+                        value:0,
+                        // 筛选选项 的中文名称
+                        text:"",
+                    },
+                ],
+            },
+        ],
+        
+        // 总条目数
+        "total": 0
+    }
+}
+```
+
+
+
+## 相关网站说明
+
+### 配置表头数据地址
+
+https://diluitable.steerinfo.com/#/
+

+ 91 - 0
src/views/RMS/components/addCapacity.vue

@@ -23,7 +23,35 @@
             </template>
             </template>
           </el-autocomplete>
           </el-autocomplete>
         </el-form-item>
         </el-form-item>
+        
       </el-form>
       </el-form>
+       <el-form :inline="true" class="demo-form-inline" label-width="80px">
+         <el-form-item label="上传行驶证">
+          <el-upload
+            class="upload-demo"
+            ref="upload1"
+            action="http://172.16.33.166:8080/api/v1/rms/uploadCarrier1"
+            :before-upload="beforeUpload"
+            :multiple="false"
+            list-type="picture"
+            :show-file-list="false"
+            :on-success="handleAvatarSuccess"
+            :on-error="onError(1)"
+          >
+            <span class="span"></span>
+            <el-input
+              class="shippingCertificate"
+              placeholder="请选择运输证(必填项)"
+              v-model="shippingCertificate"
+              disabled
+            >
+            </el-input>
+            <el-button size="small" type="primary" @click="upCLick(1)"
+              >点击上传运输证</el-button
+            >
+          </el-upload>
+        </el-form-item>
+       </el-form>
     </div>
     </div>
 
 
     <div class="button_box">
     <div class="button_box">
@@ -42,8 +70,10 @@ export default {
   components: { PageTitle },
   components: { PageTitle },
   data() {
   data() {
     return {
     return {
+      driverLicence:"",
       addLoading: false,
       addLoading: false,
       form1: {},
       form1: {},
+      shippingCertificate:"",
       form1Initialization: {
       form1Initialization: {
         capacityTypeId: 1,
         capacityTypeId: 1,
         capacityNumber: "",
         capacityNumber: "",
@@ -84,6 +114,56 @@ export default {
       });
       });
   },
   },
   methods: {
   methods: {
+     upCLick(val) {
+      this.num = val;
+    },
+    beforeUpload(file) {
+      this.upBool = true;
+      const isLt2M = file.size < 1024 * 1024 * 0.5;
+      if (!isLt2M) {
+        this.$message.error("上传文件大小不能超过500kb!");
+      } else {
+        let size = file.size / 1024;
+        let _URL = window.URL || window.webkitURL;
+        let img = new Image();
+        img.src = _URL.createObjectURL(file);
+      }
+      return isLt2M;
+    },
+    onError(err) {
+      if (this.upBool) {
+        if (this.num == 1) {
+          this.shippingCertificate = null;
+          this.imageUrl1 = null;
+          // this.$message.error("上传失败");
+        } else if (this.num == 2) {
+          this.businessLicense = null;
+          this.imageUrl2 = null;
+          // this.$message.error("上传失败");
+        } else if (this.num == 3) {
+          this.businessLicense1 = null;
+          this.imageUrl3 = null;
+          // this.$message.error("上传失败");
+        }
+      }
+    },
+    handleAvatarSuccess(res, file) {
+      console.log(res,file)
+      if (res.code) {
+        this.upBool = false;
+        if (this.num == 1) {
+          this.driverLicence = res.data;
+          this.shippingCertificate = file.name;
+        } else if (this.num == 2) {
+          this.imageUrl2 = res.data;
+          this.businessLicense = file.name;
+        } else if (this.num == 3) {
+          this.imageUrl3 =res.data;
+          this.businessLicense1 = file.name;
+        }
+        this.$message.success("上传成功");
+      }
+    },
     //承运商弹出层
     //承运商弹出层
     handleSelect(item) {
     handleSelect(item) {
       this.carrierIds = item.carrierId;
       this.carrierIds = item.carrierId;
@@ -169,6 +249,7 @@ export default {
         capacityOwneris: this.form1.capacityOwneris,
         capacityOwneris: this.form1.capacityOwneris,
         capacityVip: this.form1.capacityVip,
         capacityVip: this.form1.capacityVip,
         capacityBlacklist: this.form1.capacityBlacklist,
         capacityBlacklist: this.form1.capacityBlacklist,
+        driverLicence:this.driverLicence,
         remark: this.form1.remark,
         remark: this.form1.remark,
         carrierId: this.carrierIds,
         carrierId: this.carrierIds,
         state: this.state,
         state: this.state,
@@ -189,6 +270,7 @@ export default {
         formData.append("userCode", this.form1.capacityNumber.toUpperCase());
         formData.append("userCode", this.form1.capacityNumber.toUpperCase());
         formData.append("orgCode", "yunli");
         formData.append("orgCode", "yunli");
         formData.append("orgName", "运力");
         formData.append("orgName", "运力");
+        
         formData.append("groupId", "506514577756917769");
         formData.append("groupId", "506514577756917769");
         formData.append("companyId", "713710108567277568");
         formData.append("companyId", "713710108567277568");
         formData.append("orgId", "924126716337721344");
         formData.append("orgId", "924126716337721344");
@@ -261,6 +343,15 @@ export default {
 };
 };
 </script>
 </script>
 <style lang='scss' >
 <style lang='scss' >
+.shippingCertificate{
+  width: 200px;
+}
+.el-form--inline .el-form-item__content {
+    display: inline-block;
+    vertical-align: top;
+    position: relative;
+    left: 37px;
+}
 .addCapacity {
 .addCapacity {
   .elForm {
   .elForm {
     margin-left: 40%;
     margin-left: 40%;

+ 6 - 6
src/views/RMS/components/addCarrier.vue

@@ -35,7 +35,7 @@
     <el-upload
     <el-upload
       class="upload-demo"
       class="upload-demo"
       ref="upload1"
       ref="upload1"
-      action="https://wl.dasteel.cn:32322/api/v1/rms/uploadCarrier1"
+      action="http://172.16.33.166:8080/api/v1/rms/uploadCarrier1"
       :before-upload="beforeUpload"
       :before-upload="beforeUpload"
       :multiple="false"
       :multiple="false"
       list-type="picture"
       list-type="picture"
@@ -55,10 +55,11 @@
         >点击上传运输证</el-button
         >点击上传运输证</el-button
       >
       >
     </el-upload>
     </el-upload>
+     <!-- action="https://wl.dasteel.cn:32322/api/v1/rms/uploadCarrier1" -->
     <el-upload
     <el-upload
       class="upload-demo"
       class="upload-demo"
       ref="upload2"
       ref="upload2"
-      action="https://wl.dasteel.cn:32322/api/v1/rms/uploadCarrier1"
+      action="http://172.16.33.166:8080/api/v1/rms/uploadCarrier1"
       :before-upload="beforeUpload"
       :before-upload="beforeUpload"
       :multiple="false"
       :multiple="false"
       list-type="picture"
       list-type="picture"
@@ -81,7 +82,7 @@
     <el-upload
     <el-upload
       class="upload-demo"
       class="upload-demo"
       ref="upload3"
       ref="upload3"
-      action="https://wl.dasteel.cn:32322/api/v1/rms/uploadCarrier1"
+      action="http://172.16.33.166:8080/api/v1/rms/uploadCarrier1"
       :before-upload="beforeUpload"
       :before-upload="beforeUpload"
       :multiple="false"
       :multiple="false"
       list-type="picture"
       list-type="picture"
@@ -279,7 +280,6 @@ export default {
         this.$store
         this.$store
           .dispatch("system/usersManage/addUser", fromData)
           .dispatch("system/usersManage/addUser", fromData)
           .then((res) => {
           .then((res) => {
-            console.log(1)
             if (res.code === "0") {
             if (res.code === "0") {
               let userId = res.data.userId;
               let userId = res.data.userId;
               this.axios
               this.axios
@@ -291,7 +291,6 @@ export default {
                     "&roleId=924449091658846208"
                     "&roleId=924449091658846208"
                 )
                 )
                 .then((res) => {
                 .then((res) => {
-                  console.log(2)
                   if (res.code == "0") {
                   if (res.code == "0") {
                     //图片地址
                     //图片地址
                     let imageUrls = {
                     let imageUrls = {
@@ -360,7 +359,7 @@ export default {
       margin-right: 10px;
       margin-right: 10px;
       width: 40px;
       width: 40px;
       position: relative;
       position: relative;
-      left: 40px;
+       left: 40px;
     }
     }
     .input {
     .input {
       width: 250px;
       width: 250px;
@@ -414,6 +413,7 @@ export default {
   .site{
   .site{
     position: relative;
     position: relative;
     left: -50px;
     left: -50px;
+  
   }
   }
   span.text {
   span.text {
     position: relative;
     position: relative;

+ 10 - 0
src/views/RMS/components/capacity.vue

@@ -43,6 +43,13 @@
               v-if="show==true">
               v-if="show==true">
               删除
               删除
             </el-button>
             </el-button>
+             <el-button
+              type="text"
+              size="small"
+              @click="showCapacity(scope.row.capacityId)"
+              v-if="show==false">
+              查看详情
+            </el-button>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
       </dilTable>
       </dilTable>
@@ -123,6 +130,9 @@ export default {
     updateCapacity(capacityId){
     updateCapacity(capacityId){
       this.$router.push("/editCapacity/" + capacityId)
       this.$router.push("/editCapacity/" + capacityId)
     },
     },
+    showCapacity(capacityId){
+      this.$router.push("/showCapacity/" + capacityId)
+    },
     deleteUser(userId){
     deleteUser(userId){
       this.axios.delete("pass/v1/sysusers/" + userId) .then((res) => {
       this.axios.delete("pass/v1/sysusers/" + userId) .then((res) => {
       });
       });

+ 252 - 0
src/views/RMS/components/showCapacity.vue

@@ -0,0 +1,252 @@
+<template>
+  <!-- 修改运力信息 -->
+<div class="editCapacity">
+  <div id="contractDetails">
+    <page-title>编辑</page-title>
+    <div class="contractimage">
+      <el-image  class="imageStyle"
+            :src="src" 
+            :preview-src-list="srcList" >
+      </el-image>
+    </div>
+    <div class="contractTitle">
+      <div class="form_box" style="margin-right: 10rem">
+          <dil-form :formId="310" v-model="form1"></dil-form>
+      </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">{{ item.carrierName }}</div>
+        </template>
+        </el-autocomplete>
+        </el-form-item>
+    </el-form>
+</div>
+    
+</div>
+    <div class="button_box">
+      <el-button type="primary" @click="onClickConfirm">确认</el-button>
+    </div>
+  </div>
+
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      srcList:[],
+      src:"",
+      state: "",
+      userId:null,
+      restaurants: [],
+      accessToken:null,
+      userCode:null,
+      carrierUserId:null,
+      carrierId:null,
+      carrierIds:null,
+      direction: 'rtl',
+      inputText:"",
+      form1: {},
+      carrierUserId:null,
+      carrierName:"",
+      options:{
+        requestUrl:"/api/v1/rms/getCarrierList?apiId=417",
+        selectionType:"radio",
+        mapList:[]
+      }
+    };
+  },
+  created(){
+      this.carrierUserId = getCookie("userId");
+      console.log(this.carrierUserId ,'carrierUserId')     
+  },
+  mounted() {
+   this.information();
+   this.axios.post(
+       "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
+      )
+      .then((res) => {
+        if(res.data.code == "200"){
+        console.log(res.data.data)
+        this.state = res.data.data.carrierName
+        this.carrierIds = res.data.data.carrierId
+        }      
+  })},
+  methods: {
+    //承运商弹出层
+    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(selection){
+      this.mapList=selection,
+      console.log(this.mapList)
+      this.carrierName=this.mapList.carrierName
+    },
+    onclick(){
+      this.options.requestUrl="/api/v1/rms/getCarrierList?apiId=417&con=" +this.inputText;
+    },
+    information() {
+      //编辑 
+    console.log(this.$route.params)            
+     
+      this.axios
+        .post(
+          "/api/v1/rms/getCapacityById/" +
+            this.$route.params.capacityId
+        )
+        .then((res) => {
+            console.log(res.data.data)
+          res.data.data.forEach((e) => {          
+            this.form1 = e;
+            console.log(e);
+            console.log(this.form1);
+            console.log( this.$route.params.capacityId);
+            this.srcList=[];
+            this.isShow=true;
+            this.src=e.driverLicenceUrl;
+            this.srcList.push(e.driverLicenceUrl)
+          }); 
+        this.axios
+        .post(
+          "/api/v1/rms/getCarrierNameById/" +
+          this.$route.params.capacityId
+        )
+        .then((res) => {
+          this.state=res.data.data.carrierName
+          console.log("carrierName",this.carrierName);
+        }); 
+        });
+    },
+    // 返回
+    onClickCancel() {
+      this.$router.go(-1);
+    },
+    // 确认
+    onClickConfirm() {
+      console.log(this.form1)
+       let RmsCapacity={
+         capacityId:this.form1.capacityId,
+         capacityTypeId:this.form1.capacityTypeId,
+         capacityNumber:this.form1.capacityNumber.toUpperCase(),
+         capacityCorlor:this.form1.capacityCorlor,
+         capacityOwneris:this.form1.capacityOwneris,
+         capacityVip:this.form1.capacityVip,
+         capacityBlacklist:this.form1.capacityBlacklist,
+         carrierId:this.carrierIds,
+       };if(
+         RmsCapacity.capacityNumber==null ||
+         RmsCapacity.capacityCorlor==null ||
+         RmsCapacity.capacityOwneris==null ||
+         RmsCapacity.capacityVip==null ||
+         RmsCapacity.capacityBlacklist==null 
+         //RmsCapacity.carrierId==null
+       )this.$message.error("存在空值!");  
+        console.log( this.$route.params.capacityId);
+        this.axios
+          .post(
+            "/api/v1/rms/updateCapacity",
+           RmsCapacity
+          )
+          .then((res) => {
+            if (res.data.code == "200") {
+              this.$message.success("修改成功")
+              this.$router.go(-1);           
+            }
+          });
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+  .contractimage{
+    text-align: center;
+    position: relative;
+    left: 35px;
+  }
+.editCapacity{
+    .elForm{
+      margin-left: 40%;
+    }
+    .form_box {
+    width: 100%;
+    margin-top: 30px;
+    display: flex;
+    justify-content: center;
+    .el-form-item{
+      display: flex;
+      justify-content: center;
+      .el-form-item__label{
+        display: flex;
+        align-items: center;
+      }
+      .el-form-item__content{
+         .el-select{
+            width: 250px;
+          }
+          .el-input{
+            width: 250px;
+          }
+      }
+    }
+ }
+ .imageStyle{
+    height:150px;
+    text-align:center
+ }
+ .button_box{
+    display: flex;
+    justify-content: center;
+    .el-button{
+      width: 80px;
+      margin-right: 10px;
+    }
+ }
+ .disableBox{
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 1.5rem;
+  margin-bottom: 1.25rem;
+}
+}
+ 
+</style>

+ 10 - 7
src/views/RMS/components/showCarrier.vue

@@ -5,18 +5,17 @@
     <div class="main">
     <div class="main">
     </div>
     </div>
     <div class="contractimage">
     <div class="contractimage">
-      <el-image 
-            style=" height:150px;text-align:center"
+      <el-image  class="imageStyle"
             :src="src" 
             :src="src" 
             :preview-src-list="srcList">
             :preview-src-list="srcList">
-          </el-image>
-          <el-image 
-            style=" height:150px;text-align:center"
+      </el-image>
+          
+          <el-image   class="imageStyle"
             :src="src1" 
             :src="src1" 
             :preview-src-list="srcList1">
             :preview-src-list="srcList1">
-          </el-image>
+            </el-image>
           <el-image 
           <el-image 
-            style=" height:150px;text-align:center"
+            class="imageStyle"
             :src="src2" 
             :src="src2" 
             :preview-src-list="srcList2">
             :preview-src-list="srcList2">
           </el-image>
           </el-image>
@@ -185,6 +184,10 @@ export default {
 </script>
 </script>
 <style lang='scss'>
 <style lang='scss'>
 
 
+.imageStyle{
+    height:150px;
+    text-align:center
+ }
   .contractimage{
   .contractimage{
     text-align: center;
     text-align: center;
     position: relative;
     position: relative;

+ 4 - 2
src/views/RMS/router/index.js

@@ -52,8 +52,9 @@ import rawMaterialManufacturer from '../components/rawMaterialManufacturer.vue'
 import rawWarehouse from '../components/rawWarehouse.vue'
 import rawWarehouse from '../components/rawWarehouse.vue'
 import rmsShipper from '../components/rmsShipper.vue'
 import rmsShipper from '../components/rmsShipper.vue'
 import supplier from '../components/supplier.vue'
 import supplier from '../components/supplier.vue'
-import transitRoute from '../components/transitRoute.vue'
+import transitRoute from '../components/transitRoute.vue'  
 import showCarrier from '../components/showCarrier.vue'
 import showCarrier from '../components/showCarrier.vue'
+import showCapacity from '../components/showCapacity.vue'
 import transitRouteAdd from '../components/transitRouteAdd.vue'
 import transitRouteAdd from '../components/transitRouteAdd.vue'
 import truckCalculate from '../components/truckCalculate.vue'
 import truckCalculate from '../components/truckCalculate.vue'
 import consignee from '../components/consignee.vue'
 import consignee from '../components/consignee.vue'
@@ -85,11 +86,12 @@ const constantRouterMap = [
 		{path: 'addOtherCapacity', name: 'addOtherCapacity', meta: {code: 'xtpzgl-yhgl'}, component: addOtherCapacity},
 		{path: 'addOtherCapacity', name: 'addOtherCapacity', meta: {code: 'xtpzgl-yhgl'}, component: addOtherCapacity},
 		{path: 'capacity', name: 'capacity', meta: {code: 'xtpzgl-yhgl'}, component: capacity},
 		{path: 'capacity', name: 'capacity', meta: {code: 'xtpzgl-yhgl'}, component: capacity},
 		{path: 'carDriver', name: 'carDriver', meta: {code: 'xtpzgl-yhgl'}, component: carDriver},
 		{path: 'carDriver', name: 'carDriver', meta: {code: 'xtpzgl-yhgl'}, component: carDriver},
-		{path: 'carrier', name: 'carrier', meta: {code: 'xtpzgl-yhgl'}, component: carrier},
+		{path: 'carrier', name: 'carrier', meta: {code: 'xtpzgl-yhgl'}, component: carrier},  
 		{path: 'editCapacity/:capacityId', name: 'editCapacity', meta: {code: 'xtpzgl-yhgl'}, component: editCapacity},
 		{path: 'editCapacity/:capacityId', name: 'editCapacity', meta: {code: 'xtpzgl-yhgl'}, component: editCapacity},
 		{path: 'editCarDriver/:driverId', name: 'editCarDriver', meta: {code: 'xtpzgl-yhgl'}, component: editCarDriver},
 		{path: 'editCarDriver/:driverId', name: 'editCarDriver', meta: {code: 'xtpzgl-yhgl'}, component: editCarDriver},
 		{path: 'editCarrier/:carrierId', name: 'editCarrier', meta: {code: 'xtpzgl-yhgl'}, component: editCarrier},
 		{path: 'editCarrier/:carrierId', name: 'editCarrier', meta: {code: 'xtpzgl-yhgl'}, component: editCarrier},
 		{path: 'showCarrier/:carrierId', name: 'showCarrier', meta: {code: 'xtpzgl-yhgl'}, component: showCarrier},
 		{path: 'showCarrier/:carrierId', name: 'showCarrier', meta: {code: 'xtpzgl-yhgl'}, component: showCarrier},
+		{path: 'showCapacity/:capacityId', name: 'showCapacity', meta: {code: 'xtpzgl-yhgl'}, component: showCapacity},
 		{path: 'editConsignee/:consigneeId',name: 'editConsignee',meta:{code: 'xtpzgl-yhgl'},component: editConsignee},
 		{path: 'editConsignee/:consigneeId',name: 'editConsignee',meta:{code: 'xtpzgl-yhgl'},component: editConsignee},
 		{path: 'editGatepost/:gatepostId', name: 'editGatepost', meta: {code: 'xtpzgl-yhgl'}, component: editGatepost},
 		{path: 'editGatepost/:gatepostId', name: 'editGatepost', meta: {code: 'xtpzgl-yhgl'}, component: editGatepost},
 		{path: 'editMaterial/:materialId', name: 'editMaterial', meta: {code: 'xtpzgl-yhgl'}, component: editMaterial},
 		{path: 'editMaterial/:materialId', name: 'editMaterial', meta: {code: 'xtpzgl-yhgl'}, component: editMaterial},

+ 26 - 9
src/views/TMS/components/bmsport/addHandlingFee.vue

@@ -1,18 +1,14 @@
 <template>
 <template>
   <!-- 船只信息页面 -->
   <!-- 船只信息页面 -->
-  <div class="homeworkPath">
+  <div class="handingFee">
     <page-title>港口装卸费</page-title>
     <page-title>港口装卸费</page-title>
-    <div class="main">
-      <span class="text">港口装卸费新增</span>
-      <span class="a"></span>
-    </div>
     <div>
     <div>
-      <div class="form-box" style="margin-left: 5rem">
-        <el-form ><dil-form :formId="222" v-model="form"></dil-form></el-form>
+      <div class="form-box">
+        <dil-form :formId="222" v-model="form"></dil-form>
       </div>
       </div>
     </div>
     </div>
-    <div class="button-ins">
-      <el-button type="primary" @click="makeSure">新增港口装卸费</el-button>
+    <div class="button-box">
+      <el-button type="primary" @click="makeSure">新增</el-button>
     </div>
     </div>
     <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
     <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
     </dilTable>
     </dilTable>
@@ -87,4 +83,25 @@ export default {
 };
 };
 </script>
 </script>
 <style lang='scss' scoped>
 <style lang='scss' scoped>
+    .handingFee {
+      .form-box {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        .el-form-item {
+          display: flex;
+          .el-form-item__label {
+            width: 170px !important;
+          }
+          .el-input {
+            width: 210px !important;
+          }
+    }
+      }
+      .button-box {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+      }
+    }
 </style>
 </style>

+ 6 - 4
src/views/TMS/components/bmsport/handlingFee.vue

@@ -3,9 +3,6 @@
   <div class="homeworkPath">
   <div class="homeworkPath">
     <div class="top">
     <div class="top">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
       <el-button type="primary" class="btn" @click="addclick">
       <el-button type="primary" class="btn" @click="addclick">
         新增
         新增
       </el-button>
       </el-button>
@@ -91,7 +88,12 @@ export default {
 <style lang='scss' scoped>
 <style lang='scss' scoped>
 .homeworkPath {
 .homeworkPath {
   .top {
   .top {
-    padding: 1.25rem 1.875rem;
+    .el-input {
+      margin-left: 2.5rem;
+      margin-top: 2.5rem;
+      margin-bottom: 2.5rem;
+      width: 250px;
+    }
   }
   }
 }
 }
 </style>
 </style>

+ 1 - 6
src/views/TMS/components/bmsport/updateHandlingFee.vue

@@ -2,18 +2,13 @@
   <!-- 修改港口装卸费 -->
   <!-- 修改港口装卸费 -->
   <div id="contractDetails">
   <div id="contractDetails">
     <page-title>编辑</page-title>
     <page-title>编辑</page-title>
-    <div class="main">
-      <span class="text">港口装卸费</span>
-      <span class="a"></span>
-    </div>
     <div class="contractTitle">
     <div class="contractTitle">
       <div class="form-box">
       <div class="form-box">
-        <div class="form-one">
+        <div class="form-box">
           <dil-form :formId="223" v-model="form1"></dil-form>
           <dil-form :formId="223" v-model="form1"></dil-form>
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
-
     <div class="button-box">
     <div class="button-box">
       <el-button type="primary" @click="onClickConfirm">确认</el-button>
       <el-button type="primary" @click="onClickConfirm">确认</el-button>
       <el-button @click="onClickCancel">返回</el-button>
       <el-button @click="onClickCancel">返回</el-button>

+ 41 - 42
src/views/TMS/components/domesticMine/approveWagonPleaseAdd.vue

@@ -2,7 +2,7 @@
   <!-- 新增批车作业页面 -->
   <!-- 新增批车作业页面 -->
   <div id="contractDetails">
   <div id="contractDetails">
     <page-title>返回</page-title>
     <page-title>返回</page-title>
-  <div>
+    <div>
       <dilTable
       <dilTable
         v-bind.sync="option"
         v-bind.sync="option"
         v-model="table1"
         v-model="table1"
@@ -27,6 +27,9 @@
 </template>
 </template>
 <script>
 <script>
 import PageTitle from "@/components/Page/Title";
 import PageTitle from "@/components/Page/Title";
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+
 export default {
 export default {
   components: { PageTitle },
   components: { PageTitle },
   data() {
   data() {
@@ -65,7 +68,7 @@ export default {
       let approveWagonPlease = {
       let approveWagonPlease = {
         resultId: this.inf.resultId,
         resultId: this.inf.resultId,
         resultApproveDate: sjTime(this.form1.resultApproveDate),
         resultApproveDate: sjTime(this.form1.resultApproveDate),
-        resultApproveNumber: this.form1.resultApproveNumber
+        resultApproveNumber: this.form1.resultApproveNumber,
       };
       };
       function isNumber() {
       function isNumber() {
         var value = approveWagonPlease.resultApproveNumber;
         var value = approveWagonPlease.resultApproveNumber;
@@ -79,29 +82,29 @@ export default {
       }
       }
       var val = this.value;
       var val = this.value;
       if (
       if (
-        approveWagonPlease.resultId==null||
-        approveWagonPlease.resultApproveDate==null||
-        approveWagonPlease.resultApproveNumber==null
-      ) this.$message.error("存在空值!");
+        approveWagonPlease.resultId == null ||
+        approveWagonPlease.resultApproveDate == null ||
+        approveWagonPlease.resultApproveNumber == null
+      )
+        this.$message.error("存在空值!");
+      else if (!isNumber(val)) this.$message.error("请车数量必须是数字!");
       else
       else
-      if (!isNumber(val)) this.$message.error("请车数量必须是数字!");
-      else
-      this.axios
-        .post("/api/v1/tms/addApproveWagonPlease", approveWagonPlease)
-        .then(() => {
-          this.$message({
-            type: "success",  
-            message: "新增成功!",
+        this.axios
+          .post("/api/v1/tms/addApproveWagonPlease", approveWagonPlease)
+          .then(() => {
+            this.$message({
+              type: "success",
+              message: "新增成功!",
+            });
+            this.$router.go(-1);
           });
           });
-          this.$router.go(-1);
-        });
     },
     },
   },
   },
 };
 };
 </script>
 </script>
 <style lang="scss">
 <style lang="scss">
 // @import "@/styles/appoint/contract/ContractInsert.scss";
 // @import "@/styles/appoint/contract/ContractInsert.scss";
-#contractDetails{
+#contractDetails {
   .form {
   .form {
     display: flex;
     display: flex;
     .form_box {
     .form_box {
@@ -109,35 +112,31 @@ export default {
       margin-left: 35%;
       margin-left: 35%;
       margin-top: 30px;
       margin-top: 30px;
       margin-right: 22px;
       margin-right: 22px;
-      .el-form {
-        .preview-group {
-     }
+     
     }
     }
-  }          .el-form-item {
-            .el-form-item__label {
-              display: inline-block;
-              width: 70px !important;    
-              padding-right: 200px;
-              margin-bottom: 0px;
-            }
-            .el-form-item__content {
-              .el-select {
-                width: 230px;
-              }
-              .el-input {
-                width: 160px;
-                margin-left: -300px;
-                padding-bottom: 0%;
-               
-              }
-            }
-          }
+    .el-form-item {
+      .el-form-item__label {
+        display: inline-block;
+        width: 70px !important;
+        padding-right: 200px;
+        margin-bottom: 0px;
+      }
+      .el-form-item__content {
+        .el-select {
+          width: 230px;
+        }
+        .el-input {
+          width: 160px;
+          margin-left: -300px;
+          padding-bottom: 0%;
         }
         }
- 
-  .button-box{
+      }
+    }
+  }
+
+  .button-box {
     margin-top: 50px;
     margin-top: 50px;
     margin-left: 550px;
     margin-left: 550px;
-    
   }
   }
 }
 }
 </style>
 </style>

+ 4 - 3
src/views/TMS/components/domesticMine/wagonLoadAdd.vue

@@ -106,7 +106,8 @@
 
 
 <script>
 <script>
 import PageTitle from "@/components/Page/Title";
 import PageTitle from "@/components/Page/Title";
-
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
 export default {
   components: { PageTitle },
   components: { PageTitle },
   data() {
   data() {
@@ -378,13 +379,13 @@ export default {
                 type: "success",
                 type: "success",
                 message: "新增成功",
                 message: "新增成功",
               });
               });
-              this.$router.push("/wagonLoad");
+              this.$router.push("/wagonLoadMine");
             }
             }
           });
           });
       }
       }
     },
     },
     cancel() {
     cancel() {
-      this.$router.push("/wagonLoad");
+      this.$router.push("/wagonLoadMine");
     },
     },
   },
   },
 };
 };

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

@@ -57,6 +57,8 @@ export default {
       }
       }
     },
     },
     click(resultId) {
     click(resultId) {
+      console.log("点击了")
+      console.log(resultId)
       this.$router.push("/wagonLoadEdit/" + resultId);
       this.$router.push("/wagonLoadEdit/" + resultId);
     },
     },
     deleteclick(scope) {
     deleteclick(scope) {

+ 1 - 1
src/views/TMS/components/domesticMine/wagonLoadbu.vue

@@ -141,7 +141,7 @@ export default {
     },
     },
     //取消
     //取消
     cancel() {
     cancel() {
-      this.$router.push("/wagonLoad");
+      this.$router.push("/wagonLoadMine");
     },
     },
     //表格选中
     //表格选中
     selectionChange(selection) {
     selectionChange(selection) {

+ 94 - 27
src/views/TMS/components/domesticMine/wagonPleaseAdd.vue

@@ -1,27 +1,59 @@
 <template>
 <template>
   <!-- 新增请作业页面 -->
   <!-- 新增请作业页面 -->
-  <div id="contractDetails">
+ <div class="contractDetails">
     <page-title>返回</page-title>
     <page-title>返回</page-title>
+
     <div class="form">
     <div class="form">
       <div class="form_box">
       <div class="form_box">
-        <dil-form :formId="122" v-model="form1"></dil-form>
+         <dil-form :formId="122" v-model="form1" ></dil-form>
       </div>
       </div>
     </div>
     </div>
-    <div class="button-box">
+
+     <div class="fromOther">
+          <el-form
+        :inline="true"
+        class="demo-form-inline"
+        label-width="80px"
+        >
+        <el-form-item label="发货单位">
+         <el-autocomplete
+          class="inline-input"
+          v-model="stateSupplier"
+          :fetch-suggestions="querySearchSupplier"
+          placeholder="请输入发货单位名称"
+          :trigger-on-focus="false"
+          @select="handleSelectSupplier"
+        >
+        <template slot-scope="{ item }">
+          <div class="name">{{ item.supplierName }}</div>
+        </template>
+        </el-autocomplete>
+        </el-form-item>
+        </el-form>
+    </div>
+  <div class="trainTransport">
+    <!-- 确定和取消 -->
+    <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
       <el-button @click="onClickCancel">返回</el-button>
       <el-button type="primary" @click="onClickConfirm">确认</el-button>
       <el-button type="primary" @click="onClickConfirm">确认</el-button>
     </div>
     </div>
   </div>
   </div>
+ </div>
 </template>
 </template>
+
 <script>
 <script>
 import PageTitle from "@/components/Page/Title";
 import PageTitle from "@/components/Page/Title";
-
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
 export default {
   components: { PageTitle },
   components: { PageTitle },
   data() {
   data() {
     return {
     return {
       // 表单
       // 表单
       form1: {},
       form1: {},
+      supplierId: null,
+      supplierName: "",
+      stateSupplier: "",
     };
     };
   },
   },
   mounted() {
   mounted() {
@@ -31,7 +63,37 @@ export default {
     handleCheckedCitiesChange(value) {
     handleCheckedCitiesChange(value) {
       console.log(value);
       console.log(value);
     },
     },
-
+    //发货单位弹出层
+    handleSelectSupplier(item) {
+      this.supplierId = item.supplierId;
+      item.supplierName = this.supplierName;
+    },
+    //以下是发货单位边输边查搜索
+    querySearchSupplier(queryString, cb) {
+      this.axios
+        .post("/api/v1/uc/getSupplierMesByLike?index=" + this.stateSupplier)
+        .then((res) => {
+          if (res.data.code == "200") {
+            var restaurantsSupplier = res.data.data;
+            var results = queryString
+              ? restaurantsSupplier.filter(
+                  this.createFilterSupplier(queryString)
+                )
+              : restaurantsSupplier;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilterSupplier(queryString) {
+      return (restaurantsSupplier) => {
+        return (
+          restaurantsSupplier.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
     // 返回
     // 返回
     onClickCancel() {
     onClickCancel() {
       this.$router.go(-1);
       this.$router.go(-1);
@@ -41,10 +103,11 @@ export default {
       let tmstrainPleaseApproveResult = {
       let tmstrainPleaseApproveResult = {
         resultPlanDate: sjTime(this.form1.resultPlanDate),
         resultPlanDate: sjTime(this.form1.resultPlanDate),
         resultCategory: this.form1.resultCategory,
         resultCategory: this.form1.resultCategory,
-        shipperId: this.form1.shipperId,
+        supplierId: this.supplierId,
         sendStationId: this.form1.sendStationId,
         sendStationId: this.form1.sendStationId,
         toTheStationId: this.form1.toTheStationId,
         toTheStationId: this.form1.toTheStationId,
         resultPleaseNumber: this.form1.resultPleaseNumber,
         resultPleaseNumber: this.form1.resultPleaseNumber,
+        userId: getCookie("orgCode"),
         resultType: 3,
         resultType: 3,
       };
       };
       function isNumber() {
       function isNumber() {
@@ -61,7 +124,7 @@ export default {
       if (
       if (
         tmstrainPleaseApproveResult.resultPlanDate == null ||
         tmstrainPleaseApproveResult.resultPlanDate == null ||
         tmstrainPleaseApproveResult.resultCategory == null ||
         tmstrainPleaseApproveResult.resultCategory == null ||
-        tmstrainPleaseApproveResult.shipperId == null ||
+        tmstrainPleaseApproveResult.supplierId == null ||
         tmstrainPleaseApproveResult.sendStationId == null ||
         tmstrainPleaseApproveResult.sendStationId == null ||
         tmstrainPleaseApproveResult.toTheStationId == null ||
         tmstrainPleaseApproveResult.toTheStationId == null ||
         tmstrainPleaseApproveResult.resultPleaseNumber == null
         tmstrainPleaseApproveResult.resultPleaseNumber == null
@@ -82,44 +145,48 @@ export default {
   },
   },
 };
 };
 </script>
 </script>
-<style lang="scss" scoped>
-#contractDetails{
+<style lang="scss">
+.contractDetails {
   .form {
   .form {
     display: flex;
     display: flex;
     .form_box {
     .form_box {
-      width: 240px;
+      width: 340px;
       margin-left: 35%;
       margin-left: 35%;
       margin-top: 30px;
       margin-top: 30px;
-      margin-right: 22px;
+      margin-right: 20px;
       .el-form {
       .el-form {
         .preview-group {
         .preview-group {
-     }
-    }
-  }          .el-form-item {
+          .el-form-item {
             .el-form-item__label {
             .el-form-item__label {
               display: inline-block;
               display: inline-block;
-              width: 70px !important;    
-              padding-right: 200px;
-              margin-bottom: 0px;
+              width: 70px !important;
             }
             }
             .el-form-item__content {
             .el-form-item__content {
               .el-select {
               .el-select {
-                width: 230px;
+                width: 250px;
               }
               }
               .el-input {
               .el-input {
-                width: 160px;
-                margin-left: -300px;
-                padding-bottom: 0%;
-               
+                width: 250px;
+              }
+            }
+            .button_box {
+              margin-left: 42%;
+              margin-top: 55px;
+            }
+          }
+          .fromOther {
+            margin-left: 34.5%;
+            width: 50%;
+            .inline-input {
+              width: 300px;
+              .button_box {
+                margin-left: 45%;
               }
               }
             }
             }
           }
           }
         }
         }
- 
-  .button-box{
-    margin-top: 50px;
-    margin-left: 550px;
-    
+      }
+    }
   }
   }
 }
 }
 </style>
 </style>

+ 0 - 1
src/views/TMS/components/domesticMine/wagonPleaseMine.vue

@@ -89,7 +89,6 @@ export default {
             type: "success",
             type: "success",
             message: "删除成功!",
             message: "删除成功!",
           });
           });
-          // console.log(this.arr[0].text_prop);
           this.axios
           this.axios
             .post("/api/v1/tms/deleteApproveWagonPlease/" + resultId)
             .post("/api/v1/tms/deleteApproveWagonPlease/" + resultId)
             .then(() => {
             .then(() => {

+ 20 - 17
src/views/TMS/components/domesticMine/wagonUnLoadAdd.vue

@@ -27,6 +27,9 @@
 </template>
 </template>
 <script>
 <script>
 import PageTitle from "@/components/Page/Title";
 import PageTitle from "@/components/Page/Title";
+
+import { sjTime, isNumber } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
 export default {
   components: { PageTitle },
   components: { PageTitle },
   data() {
   data() {
@@ -57,13 +60,10 @@ export default {
     },
     },
     // 确定
     // 确定
     makeSure() {
     makeSure() {
-      console.log(this.list);
       let tmstrainWagonUnloadResult = {
       let tmstrainWagonUnloadResult = {
         wagonNoList: this.list,
         wagonNoList: this.list,
         resultArrivalDate: sjTime(this.form1.resultArrivalDate),
         resultArrivalDate: sjTime(this.form1.resultArrivalDate),
         resultUnloadTime: sjTime(this.form1.resultUnloadTime),
         resultUnloadTime: sjTime(this.form1.resultUnloadTime),
-        resultBigTicketWeight: this.form1.resultBigTicketWeight,
-        resultRailHorizontalWeight: this.form1.resultRailHorizontalWeight,
         resultRemark: this.form1.resultRemark,
         resultRemark: this.form1.resultRemark,
         resultType: 3,
         resultType: 3,
       };
       };
@@ -71,23 +71,27 @@ export default {
       if (
       if (
         tmstrainWagonUnloadResult.wagonNoList == null ||
         tmstrainWagonUnloadResult.wagonNoList == null ||
         tmstrainWagonUnloadResult.resultArrivalDate == null ||
         tmstrainWagonUnloadResult.resultArrivalDate == null ||
-        tmstrainWagonUnloadResult.resultUnloadTime == null ||
-        tmstrainWagonUnloadResult.resultBigTicketWeight == null ||
-        tmstrainWagonUnloadResult.resultRailHorizontalWeight == null
+        tmstrainWagonUnloadResult.resultUnloadTime == null
       )
       )
-        this.$message.error("存在空值!");
+       this.$message.error("存在空值!");
       else
       else
         this.axios
         this.axios
           .post(
           .post(
             "/api/v1/tms/insertTmstrainWagonUnLoadResult",
             "/api/v1/tms/insertTmstrainWagonUnLoadResult",
             tmstrainWagonUnloadResult
             tmstrainWagonUnloadResult
           )
           )
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "新增成功!",
-            });
-            this.$router.go(-1);
+          .then((res) => {
+            if ((res.data.code = "200")) {
+              this.$message({
+                type: "success",
+                message: "新增成功!",
+              });
+              this.$router.go(-1);
+            }else{
+               ({ type: "failed", message: "新增失败!" });
+            }
+
+            
           });
           });
     },
     },
     // 取消
     // 取消
@@ -120,7 +124,7 @@ export default {
               .el-input {
               .el-input {
                 width: 220px;
                 width: 220px;
               }
               }
-            .el-textarea{
+              .el-textarea {
                 .el-textarea__inner {
                 .el-textarea__inner {
                   display: block;
                   display: block;
                   resize: vertical;
                   resize: vertical;
@@ -130,16 +134,15 @@ export default {
                   border-radius: 4px;
                   border-radius: 4px;
                   margin-left: 56px;
                   margin-left: 56px;
                   margin-top: -25px;
                   margin-top: -25px;
-    
                 }
                 }
-             }  
+              }
             }
             }
           }
           }
         }
         }
       }
       }
     }
     }
   }
   }
-  .button-box{
+  .button-box {
     margin-top: 50px;
     margin-top: 50px;
     margin-left: 600px;
     margin-left: 600px;
   }
   }

+ 8 - 13
src/views/TMS/components/importedEmergency/addWagonLoadEmergency.vue

@@ -2,7 +2,7 @@
   <!-- 添加车皮装车实绩 -->
   <!-- 添加车皮装车实绩 -->
   <div class="addWagonLoad">
   <div class="addWagonLoad">
     <page-title>新增</page-title>
     <page-title>新增</page-title>
-    <el-divider content-position="left">车皮装车实绩</el-divider>
+ 
     <div class="cp">
     <div class="cp">
       <span>车皮号:</span>
       <span>车皮号:</span>
       <el-input
       <el-input
@@ -35,7 +35,7 @@
     </div>
     </div>
     <div class="remark from">
     <div class="remark from">
       <span class="text">船名:</span>
       <span class="text">船名:</span>
-      <el-input v-model="remark" @blur="onBlur"> </el-input>
+      <el-input class="el-input" v-model="remark" @blur="onBlur"> </el-input>
       <span class="span"></span>
       <span class="span"></span>
     </div>
     </div>
     <div class="forwardingUnit from">
     <div class="forwardingUnit from">
@@ -92,7 +92,7 @@
 
 
 <script>
 <script>
 import PageTitle from "@/components/Page/Title";
 import PageTitle from "@/components/Page/Title";
-
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
 export default {
 export default {
   components: { PageTitle },
   components: { PageTitle },
   data() {
   data() {
@@ -272,7 +272,6 @@ export default {
         this.supplierId &&
         this.supplierId &&
         this.unloadPointId &&
         this.unloadPointId &&
         this.purchaseOrderId &&
         this.purchaseOrderId &&
-        this.form1.resultClass &&
         this.form1.sendStationId &&
         this.form1.sendStationId &&
         this.form1.arrivalStationId &&
         this.form1.arrivalStationId &&
         this.form1.resultLoadingDate
         this.form1.resultLoadingDate
@@ -290,7 +289,6 @@ export default {
             if (this.supplierId) {
             if (this.supplierId) {
               if (this.unloadPointId) {
               if (this.unloadPointId) {
                 if (this.purchaseOrderId) {
                 if (this.purchaseOrderId) {
-                    if (this.form1.resultClass) {
                       if (this.form1.sendStationId) {
                       if (this.form1.sendStationId) {
                         if (this.form1.arrivalStationId) {
                         if (this.form1.arrivalStationId) {
                           if (this.form1.resultLoadingDate) {
                           if (this.form1.resultLoadingDate) {
@@ -313,12 +311,6 @@ export default {
                         });
                         });
                       }
                       }
                     } else {
                     } else {
-                      this.$message({
-                        type: "warning",
-                        message: "请选择班别!",
-                      });
-                    }
-                  } else {
                   this.$message({
                   this.$message({
                     type: "warning",
                     type: "warning",
                     message: "该物资没有采购订单号!",
                     message: "该物资没有采购订单号!",
@@ -347,8 +339,11 @@ export default {
       if(state == 1){
       if(state == 1){
         let map = {
         let map = {
           wagonNoList:this.list,
           wagonNoList:this.list,
-          unloadPointId:this.unloadPointId,
+          unloadingPointId:this.unloadPointId,
           purchaseOrderRailPlanId:this.purchaseOrderId,
           purchaseOrderRailPlanId:this.purchaseOrderId,
+          materialId:this.materialId,
+          sendUnitId:this.supplierId,
+          resultIsclear:this.form1.resultIsclear,
           resultClass: this.form1.resultClass,
           resultClass: this.form1.resultClass,
           sendStationId: this.form1.sendStationId,
           sendStationId: this.form1.sendStationId,
           arrivalStationId: this.form1.arrivalStationId,
           arrivalStationId: this.form1.arrivalStationId,
@@ -363,7 +358,7 @@ export default {
               type: "success",
               type: "success",
               message: "新增成功",
               message: "新增成功",
             });
             });
-            this.$router.push("/wagonLoad");
+            this.$router.go(-1);
           }
           }
         })
         })
       }
       }

+ 2 - 8
src/views/TMS/components/importedEmergency/addWagonUnLoadEmergency.vue

@@ -26,7 +26,7 @@
 
 
 <script>
 <script>
 import PageTitle from "@/components/Page/Title";
 import PageTitle from "@/components/Page/Title";
-
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
 export default {
 export default {
   components: { PageTitle },
   components: { PageTitle },
   data() {
   data() {
@@ -59,9 +59,6 @@ export default {
         wagonNoList: this.list,
         wagonNoList: this.list,
         resultArrivalDate: sjTime(this.form1.resultArrivalDate),
         resultArrivalDate: sjTime(this.form1.resultArrivalDate),
         resultUnloadTime: sjTime(this.form1.resultUnloadTime),
         resultUnloadTime: sjTime(this.form1.resultUnloadTime),
-        unloadingPointId: this.form1.unloadingPointId,
-        resultBigTicketWeight: this.form1.resultBigTicketWeight,
-        resultRailHorizontalWeight: this.form1.resultRailHorizontalWeight,
         resultRemark: this.form1.resultRemark,
         resultRemark: this.form1.resultRemark,
         resultType: 2,
         resultType: 2,
       };
       };
@@ -69,10 +66,7 @@ export default {
       if (
       if (
         tmstrainWagonUnloadResult.wagonNoList == null ||
         tmstrainWagonUnloadResult.wagonNoList == null ||
         tmstrainWagonUnloadResult.resultArrivalDate == null ||
         tmstrainWagonUnloadResult.resultArrivalDate == null ||
-        tmstrainWagonUnloadResult.resultUnloadTime == null ||
-        tmstrainWagonUnloadResult.unloadingPointId == null ||
-        tmstrainWagonUnloadResult.resultBigTicketWeight == null ||
-        tmstrainWagonUnloadResult.resultRailHorizontalWeight == null
+        tmstrainWagonUnloadResult.resultUnloadTime == null
       )
       )
         this.$message.error("存在空值!");
         this.$message.error("存在空值!");
       else
       else

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

@@ -41,7 +41,7 @@ export default {
             type: "success",
             type: "success",
             message: "发送成功",
             message: "发送成功",
           });
           });
-          this.option.requestUrl = "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=2";
+          this.option.requestUrl = "/api/v1/tms/getLoadResultToSendMC?apiId=58&resultType=2&i=" + new Date();
         }
         }
       })
       })
     },
     },

+ 3 - 2
src/views/TMS/components/importedEmergency/wagonUnLoadEmergency.vue

@@ -47,12 +47,13 @@ export default {
   },
   },
   methods: {
   methods: {
     btnclick(num,unloadingId) {
     btnclick(num,unloadingId) {
+      console.log(num,unloadingId)
       if ( num == 0 ) {
       if ( num == 0 ) {
         this.option.requestUrl = '/api/v1/tms/getTmstrainWagonUnLoad?apiId=60&resultType=2&con='+this.input;
         this.option.requestUrl = '/api/v1/tms/getTmstrainWagonUnLoad?apiId=60&resultType=2&con='+this.input;
       } else if (num == 1 ) {
       } else if (num == 1 ) {
-        this.$router.push("/addWagonLoadEmergency")
+        this.$router.push("/addWagonUnLoadEmergency")
       }else if (num == 2) {
       }else if (num == 2) {
-        this.$router.push("/editWagonLoadEmergency/" + unloadingId);
+        this.$router.push("/editWagonUnLoadEmergency/" + unloadingId);
       }
       }
     },
     },
     deleteclick(scope) {
     deleteclick(scope) {

+ 3 - 3
src/views/TMS/components/importedFuel/truckDriverReceiveRan.vue

@@ -59,11 +59,11 @@ export default {
     activeName(val){
     activeName(val){
       if (getCookie("orgCode") == "chengyunshang") {
       if (getCookie("orgCode") == "chengyunshang") {
         if(val == "option"){
         if(val == "option"){
-          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&i="+new Date()+"&carrierSSOId=" + null;
+          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=4&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
         }else if(val == "first"){
         }else if(val == "first"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&i="+new Date()+"&carrierSSOId=" + null;
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&fuelOrder=1&orderStatus=5&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
         }else if(val == "second"){
         }else if(val == "second"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&i="+new Date()+"&carrierSSOId=" + null;
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&fuelOrder=1&orderStatus=6&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
         }
         }
       }else{
       }else{
         if(val == "option"){
         if(val == "option"){

+ 3 - 3
src/views/TMS/components/importedIngredients/truckDriverReceiveFu.vue

@@ -59,11 +59,11 @@ export default {
     activeName(val){
     activeName(val){
       if (getCookie("orgCode") == "chengyunshang") {
       if (getCookie("orgCode") == "chengyunshang") {
         if(val == "option"){
         if(val == "option"){
-          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&i="+new Date()+"&carrierSSOId=" + null;
+          this.option.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=4&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
         }else if(val == "first"){
         }else if(val == "first"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&i="+new Date()+"&carrierSSOId=" + null;
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=148&orderType=5&orderStatus=5&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
         }else if(val == "second"){
         }else if(val == "second"){
-          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&i="+new Date()+"&carrierSSOId=" + null;
+          this.option1.requestUrl = "/api/v1/oms/getTransportDispatch?apiId=241&orderType=5&orderStatus=6&i="+new Date()+"&carrierSSOId=" + getCookie("userId");
         }
         }
       }else{
       }else{
         if(val == "option"){
         if(val == "option"){

+ 0 - 6
src/views/TMS/components/importedMine/addWagonPlease.vue

@@ -32,12 +32,6 @@
         </el-form>
         </el-form>
     </div>
     </div>
   <div class="trainTransport">
   <div class="trainTransport">
-    <page-title>返回</page-title>
-    <div class="form">
-      <div class="form_box">
-          <dil-form :formId="122" v-model="form1" ref="from1"></dil-form>
-      </div>   
-    </div>
     <!-- 确定和取消 -->
     <!-- 确定和取消 -->
     <div class="button_box">
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
       <el-button @click="onClickCancel">返回</el-button>

+ 1 - 1
src/views/TMS/components/importedMine/wagonApprove.vue

@@ -37,7 +37,7 @@ export default {
       option: {
       option: {
         // 表格请求数据的地址
         // 表格请求数据的地址
         requestUrl:
         requestUrl:
-          "/api/v1/tms/getApproveAllWagonPlease?apiId=70&resultType=1",
+          "/api/v1/tms/getApproveAllWagonPlease?apiId=70&resultType=1&status=2",
       },
       },
     };
     };
   },
   },

+ 2 - 2
src/views/TMS/router/index.js

@@ -257,7 +257,7 @@ const constantRouterMap = [
       {path: 'wagonLoadMine', name: 'wagonLoadMine', meta: {code: 'xtpzgl-yhgl'}, component: wagonLoadMine},
       {path: 'wagonLoadMine', name: 'wagonLoadMine', meta: {code: 'xtpzgl-yhgl'}, component: wagonLoadMine},
       {path: 'wagonLoadbu', name: 'wagonLoadbu', meta: {code: 'xtpzgl-yhgl'}, component: wagonLoadbu},
       {path: 'wagonLoadbu', name: 'wagonLoadbu', meta: {code: 'xtpzgl-yhgl'}, component: wagonLoadbu},
       {path: 'wagonLoadAdd', name: 'wagonLoadAdd', meta: {code: 'xtpzgl-yhgl'}, component: wagonLoadAdd},
       {path: 'wagonLoadAdd', name: 'wagonLoadAdd', meta: {code: 'xtpzgl-yhgl'}, component: wagonLoadAdd},
-      {path: 'wagonLoadEdit', name: 'wagonLoadEdit', meta: {code: 'xtpzgl-yhgl'}, component: wagonLoadEdit},
+      {path: 'wagonLoadEdit/:resultId', name: 'wagonLoadEdit', meta: {code: 'xtpzgl-yhgl'}, component: wagonLoadEdit},
       {path: 'wagonPleaseMine', name: 'wagonPleaseMine', meta: {code: 'xtpzgl-yhgl'}, component: wagonPleaseMine},
       {path: 'wagonPleaseMine', name: 'wagonPleaseMine', meta: {code: 'xtpzgl-yhgl'}, component: wagonPleaseMine},
       {path: 'wagonPleaseAdd', name: 'wagonPleaseAdd', meta: {code: 'xtpzgl-yhgl'}, component: wagonPleaseAdd},
       {path: 'wagonPleaseAdd', name: 'wagonPleaseAdd', meta: {code: 'xtpzgl-yhgl'}, component: wagonPleaseAdd},
       {path: 'wagonPleaseEdit/:resultId', name: 'wagonPleaseEdit', meta: {code: 'xtpzgl-yhgl'}, component: wagonPleaseEdit},
       {path: 'wagonPleaseEdit/:resultId', name: 'wagonPleaseEdit', meta: {code: 'xtpzgl-yhgl'}, component: wagonPleaseEdit},
@@ -268,7 +268,7 @@ const constantRouterMap = [
 
 
       {path: 'addWagonLoadEmergency', name: 'addWagonLoadEmergency', meta: {code: 'xtpzgl-yhgl'}, component: addWagonLoadEmergency},
       {path: 'addWagonLoadEmergency', name: 'addWagonLoadEmergency', meta: {code: 'xtpzgl-yhgl'}, component: addWagonLoadEmergency},
       {path: 'addWagonUnLoadEmergency', name: 'addWagonUnLoadEmergency', meta: {code: 'xtpzgl-yhgl'}, component: addWagonUnLoadEmergency},
       {path: 'addWagonUnLoadEmergency', name: 'addWagonUnLoadEmergency', meta: {code: 'xtpzgl-yhgl'}, component: addWagonUnLoadEmergency},
-      {path: 'editWagonUnLoadEmergency', name: 'editWagonUnLoadEmergency', meta: {code: 'xtpzgl-yhgl'}, component: editWagonUnLoadEmergency},
+      {path: 'editWagonUnLoadEmergency/:unloadingId', name: 'editWagonUnLoadEmergency', meta: {code: 'xtpzgl-yhgl'}, component: editWagonUnLoadEmergency},
       {path: 'editWagonLoadEmergency/:unloadingId', name: 'editWagonLoadEmergency', meta: {code: 'xtpzgl-yhgl'}, component: editWagonLoadEmergency},
       {path: 'editWagonLoadEmergency/:unloadingId', name: 'editWagonLoadEmergency', meta: {code: 'xtpzgl-yhgl'}, component: editWagonLoadEmergency},
       {path: 'entrustEmergency', name: 'entrustEmergency', meta: {code: 'xtpzgl-yhgl'}, component: entrustEmergency},
       {path: 'entrustEmergency', name: 'entrustEmergency', meta: {code: 'xtpzgl-yhgl'}, component: entrustEmergency},
       {path: 'trainDetails', name: 'trainDetails', meta: {code: 'xtpzgl-yhgl'}, component: trainDetails},
       {path: 'trainDetails', name: 'trainDetails', meta: {code: 'xtpzgl-yhgl'}, component: trainDetails},

+ 20 - 9
src/views/appoint/components/purchase/addOtherPrice.vue

@@ -2,20 +2,13 @@
   <!-- 添加其他价格 -->
   <!-- 添加其他价格 -->
   <div class="addShipPrice">
   <div class="addShipPrice">
     <page-title>新增</page-title>
     <page-title>新增</page-title>
-    <el-divider content-position="left">添加其他价格</el-divider>
-     <div class="form-box" style="margin-right: 10rem">
+     <div class="form-box">
         <dil-form :formId="221" v-model="form1" ref="from1"></dil-form>
         <dil-form :formId="221" v-model="form1" ref="from1"></dil-form>
       </div>
       </div>
     <div class="button-box">
     <div class="button-box">
       <el-button @click="cancel">取消</el-button>
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
     </div>
     </div>
-    <!-- <div class="primarybtn">
-      <el-button class="btn" @click="goback">取消</el-button>
-      <el-button type="primary" class="btn" @click="submitclick"
-        >确定</el-button
-      >
-    </div> -->
   </div>
   </div>
 </template>
 </template>
 
 
@@ -62,5 +55,23 @@ export default {
 };
 };
 </script>
 </script>
 <style lang='scss' scoped>
 <style lang='scss' scoped>
-
+  .form-box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    .el-form-item {
+      display: flex;
+      .el-form-item__label {
+        width: 170px !important;
+      }
+      .el-input {
+        width: 210px !important;
+      }
+    }
+  }
+  .button-box {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
 </style>
 </style>

+ 7 - 8
src/views/appoint/components/purchase/otherPrice.vue

@@ -2,15 +2,13 @@
   <!-- 其他单价页面 -->
   <!-- 其他单价页面 -->
   <div class="homeworkPath">
   <div class="homeworkPath">
     <div class="top">
     <div class="top">
-      <el-input v-model="input" placeholder="请输入内容"></el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
+      <el-input></el-input>
       <el-button type="primary" @click="btnclick()">
       <el-button type="primary" @click="btnclick()">
         新增
         新增
       </el-button>
       </el-button>
     </div>
     </div>
-    <dilTable v-bind.sync="option">
+    <div>
+      <dilTable v-bind.sync="option">
       <el-table-column fixed="right" label="操作" align="center" width="150">
       <el-table-column fixed="right" label="操作" align="center" width="150">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-button @click="click(scope.row.priceId)" type="text" size="small"
           <el-button @click="click(scope.row.priceId)" type="text" size="small"
@@ -25,6 +23,7 @@
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </dilTable>
     </dilTable>
+    </div> 
   </div>
   </div>
 </template>
 </template>
 
 
@@ -45,9 +44,6 @@ export default {
     
     
   },
   },
   methods: {
   methods: {
-    handleSelect(item) {
-      console.log(item);
-    },
     onclick() {
     onclick() {
       console.log(1);
       console.log(1);
     },
     },
@@ -103,6 +99,9 @@ export default {
 <style lang='scss' scoped>
 <style lang='scss' scoped>
 .homeworkPath {
 .homeworkPath {
   .top {
   .top {
+    .el-input {
+      width: 250px;
+    }
     padding: 1.25rem 1.875rem;
     padding: 1.25rem 1.875rem;
   }
   }
 }
 }

+ 19 - 6
src/views/appoint/components/purchase/updateOtherPrice.vue

@@ -2,10 +2,6 @@
   <!-- 修改其他价格信息 -->
   <!-- 修改其他价格信息 -->
   <div id="contractDetails">
   <div id="contractDetails">
     <page-title>编辑</page-title>
     <page-title>编辑</page-title>
-    <div class="main">
-      <span class="text">修改其他价格信息</span>
-      <span class="a"></span>
-    </div>
     <div class="contractTitle">
     <div class="contractTitle">
       <div class="form-box">
       <div class="form-box">
         <div class="form-one">
         <div class="form-one">
@@ -13,7 +9,6 @@
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
-
     <div class="button-box">
     <div class="button-box">
       <el-button type="primary" @click="onClickConfirm">确认</el-button>
       <el-button type="primary" @click="onClickConfirm">确认</el-button>
       <el-button @click="onClickCancel">返回</el-button>
       <el-button @click="onClickCancel">返回</el-button>
@@ -81,5 +76,23 @@ export default {
 };
 };
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-
+    .form-box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    .el-form-item {
+      display: flex;
+      .el-form-item__label {
+        width: 170px !important;
+      }
+      .el-input {
+        width: 210px !important;
+      }
+    }
+  }
+  .button-box {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
 </style>
 </style>

File diff suppressed because it is too large
+ 1095 - 217
src/views/appoint/components/saleContract/addSaleOrder.vue


+ 2 - 3
src/views/appoint/components/saleContract/addSaleOrderSend.vue

@@ -67,9 +67,8 @@
               <template v-if="item.prop == 'orderPlanWeight'">
               <template v-if="item.prop == 'orderPlanWeight'">
                 <el-input
                 <el-input
                   class="textinput"
                   class="textinput"
-                  @input="onInput"
                   placeholder="(必填)"
                   placeholder="(必填)"
-                  v-model.number="scope.row.orderPlanWeight"
+                  v-model="scope.row.orderPlanWeight"
                 ></el-input>
                 ></el-input>
               </template>
               </template>
 
 
@@ -448,7 +447,7 @@ export default {
   methods: {
   methods: {
     onInput(val){
     onInput(val){
       if(!isNumber(val)){
       if(!isNumber(val)){
-        this.$message.warning('重量/电话号码请输入数字')
+        this.$message.warning('电话号码请输入数字')
       }
       }
     },
     },
     //收货地址弹出层
     //收货地址弹出层

+ 749 - 0
src/views/appoint/components/saleContract/addSaleOrderSteelSend.vue

@@ -0,0 +1,749 @@
+<template>
+  <div class="addSaleOrderSend">
+    <page-title>新增销售订单钢材派车</page-title>
+    <!-- 派车表格 -->
+    <div class="selectionTable from">
+      <el-table
+        :data="selectionList"
+        border
+        style="width: 100%"
+        highlight-current-row
+        :span-method="cellMerge"
+      >
+        <el-table-column
+          v-for="(item, i) in tableTop"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          :width="item.width"
+          align="center"
+          show-overflow-tooltip
+        >
+          <template slot="scope" v-if="item.label !== '车牌号'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '承运商'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '件数'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '运输线路'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '运输单价'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '截止日期'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '收货客户'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '收货客户电话号码'">
+            <span>{{ item.label }}</span>
+          </template>
+          <!-- 插入输入框 -->
+          <template slot-scope="scope">
+            <template v-if="item.slot">
+              <!-- 车牌号 -->
+              <template v-if="item.prop == 'capacityNumber'">
+                <el-autocomplete
+                class="inline-input"
+                v-model="scope.row.capacityNumber"
+                :fetch-suggestions="querySearch"
+                placeholder="(必填)"
+                :trigger-on-focus="false"
+                @select="handleSelect"
+                @blur="checkRelationship(scope.$index)"
+                @change="batchUpdateValue(scope.row,scope.$index)"
+                ></el-autocomplete>
+              </template>
+
+              <!-- 承运商 -->
+              <template v-if="item.prop == 'carrierName'">
+                <el-autocomplete
+                    class="inline-input"
+                    v-model="scope.row.carrierName"
+                    :fetch-suggestions="querySearch1"
+                    placeholder="请输入承运商名称"
+                    :trigger-on-focus="false"
+                    @change="batchUpdateValue(scope.row,scope.$index)"
+                    @select="handleSelect1"
+                  >
+                    <template slot-scope="{ item }">
+                      <div class="name" v-if="item.carrierName">
+                        {{ item.carrierName }}
+                      </div>
+                    </template>
+                  </el-autocomplete>
+              </template>
+
+              <!-- 物资件数 -->
+              <template v-if="item.prop == 'orderPlanWeight'">
+                <el-input
+                  class="textinput"
+                  @input="onInput"
+                  placeholder="(必填)"
+                  v-model.number="scope.row.orderPlanWeight"
+                  disabled
+                ></el-input>
+              </template>
+
+              <!-- 物资重量 -->
+              <template v-if="item.prop == 'materialWeight'">
+                <el-input
+                  class="textinput"
+                  v-model.number="scope.row.materialWeight"
+                  disabled
+                ></el-input>
+              </template>
+
+              <!-- 运输单价id -->
+              <template v-if="item.prop == 'priceValue'" >
+                <el-input
+                  v-model="scope.row.priceValue"
+                  disabled
+                >
+                </el-input>
+              </template>
+              <!-- 截止日期 -->
+              <template v-if="item.prop == 'saleDateOfReceipt'">
+                 <el-date-picker
+                  class="textinput3"
+                  type="date"
+                  v-model.number="scope.row.saleDateOfReceipt"
+                  style="width:135px"
+                  disabled
+                ></el-date-picker>
+              </template>
+              <!-- 收货客户 -->
+              <template v-if="item.prop == 'saleOrderConsignee'">
+                <el-input
+                  class="textinput4"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsignee"
+                  disabled
+                ></el-input>
+              </template>
+              <!-- 收货客户电话号码 -->
+              <template v-if="item.prop == 'saleOrderConsigneeTel'">
+                <el-input
+                  class="textinput5"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsigneeTel"
+                  @input="onInput"
+                  disabled
+                ></el-input>
+              </template>
+            </template>
+            <template v-else>
+              <span>{{ scope.row[item.prop] }}</span>
+            </template>
+          </template>
+        </el-table-column>
+        <!-- 操作列 -->
+        <!-- <el-table-column fixed="right" label="操作" width="100">
+        </el-table-column> -->
+      </el-table>
+    </div>
+
+    <div class="button_box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+import { sjTime,isNumber,isIntegerNumber } from "@/utils/sharedJsFile";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      //存放每一行记录的合并数
+      spanArr: [],
+      //pos是spanArr的索引
+      pos:0,
+      //加载
+      selectLineLoading:false,
+      //所有选中承运商Id和承运商名称暂存
+      carrierIdAndName: [],
+      //承运商下拉框中的值
+      carrierNameOptions:[],
+      //当前车序号物资
+      selectionList:[],
+      tableTop: [
+        {
+          prop: "truckNo",
+          label: "车序号",
+          width: "50",
+        },
+        {
+          prop: "capacityNumber",
+          label: "车牌号",
+          width: "130",
+          slot: true,
+        },
+        {
+          prop: "carrierName",
+          label: "承运商",
+          width: "240",
+          slot: true,
+        },
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: "140",
+        },
+        {
+          prop: "Specification",
+          label: "规格型号",
+          width: "140",
+        },
+        {
+          prop: "orderPlanWeight",
+          label: "件数",
+          width: "80",
+          slot: true,
+        },
+        {
+          prop: "materialWeight",
+          label: "重量",
+          width: "80",
+          slot: true,
+        },
+        {
+          prop: "lineName",
+          label: "厂内运输线路",
+          width: "220",
+        },
+        {
+          prop: "saleDateOfReceipt",
+          label: "截止日期",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "saleShipperAddressName",
+          label: "收货地址",
+          width: "300",
+        },
+        {
+          prop: "priceValue",
+          label: "运输单价",
+          width: "80",
+          slot: true,
+        },
+        {
+          prop: "saleOrderConsignee",
+          label: "收货客户",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "saleOrderConsigneeTel",
+          label: "收货客户电话号码",
+          slot: true,
+          width: "150",
+        },
+        {
+          prop: "materialCode",
+          label: "物资编码",
+          width: "140",
+        },
+      ],
+    };
+  },
+  created(){
+    this.getValue();
+  },
+  methods: {
+    getValue(){
+      this.axios
+      .post("/api/v1/ams/getTruckNoMaterial?saleOrderMaterialId=" + this.$route.params.saleOrderMaterialId)
+      .then((res)=>{
+        if(res.data.data.length==0){
+            this.$confirm("该销售订单尚未排车!是否先进行排车?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+              center: true,
+            })
+            .then(() => {
+              this.$router.push("/addSaleOrderArrange/" + this.$route.params.saleOrderId);
+            })
+            .catch(() => {
+              this.$message({ type: "info", message: "取消!",});
+            });
+        }
+        //赋值派车表格
+        res.data.data.forEach((e,i) => {
+          if(e.saleOrderConsignee=="null"){
+            e.saleOrderConsignee = null
+          }
+          if(e.saleOrderConsigneeTel=="null"){
+            e.saleOrderConsigneeTel = null
+          }
+            //不带承运商初始化派车表格
+            var addmap = {
+                truckNo: e.truckNo,
+                saleOrderMaterialId: e.saleOrderMaterialId,
+                capacityNumber: null,
+                carrierName: null,
+                carrierId: null,
+                materialId: e.materialId,
+                materialName: e.materialName,
+                Specification: e.materialModelSpecification,
+                materialCode: e.materialCode,
+                orderPlanWeight: e.materialNumber,
+                materialWeight: e.materialWeight,
+                lineName:null,
+                lineId:null,
+                saleShipperAddressId: e.placeId,
+                saleShipperAddressName:e.place,
+                saleDateOfReceipt: e.receiptDate,
+                saleOrderConsignee: e.saleOrderConsignee,
+                saleOrderConsigneeTel: e.saleOrderConsigneeTel,
+            };
+            this.selectionList.push(addmap);
+            //调用记录每一行的合并数的方法
+            this.getSpanArr(this.selectionList);
+            //初始化每个车的线路
+            this.initializeLine();
+        });
+      });
+    },
+
+    //承运商弹出层
+    handleSelect1(item) {
+      let carrierIdAndNameItem = {
+        carrierId : item.carrierId,
+        carrierName : item.carrierName
+      }
+      this.carrierIdAndName.push(carrierIdAndNameItem);
+    },
+    //以下是承运商边输边查搜索
+    querySearch1(queryString, cb) {
+      this.axios
+        .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+        .then((res) => {
+          if (res.data.code == "200") {
+            var restaurants = res.data.data;
+            var results = queryString
+              ? restaurants.filter(this.createFilter1(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter1(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以上是承运商边输边查搜索
+
+    onInput(val){
+      if(!isNumber(val)){
+        this.$message.warning('重量/电话号码请输入数字')
+      }
+    },
+    //校验是否为车牌
+    isVehicleNumber(vehicleNumber) {
+      var result = false;
+      if(vehicleNumber!=null){
+        if (vehicleNumber.length == 7) {
+          var express =
+            /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
+          result = express.test(vehicleNumber);
+        }
+      }
+      return result;
+    },
+    //绑定车牌号和承运商的关系
+    bindRelationship(mapValue){
+      let RmsCapacity = {
+        capacityTypeId: 1,
+        capacityNumber: mapValue.capacityNumber,
+        capacityCorlor: "黄",
+        capacityOwneris: "否",
+        capacityVip: "否",
+        capacityBlacklist: "否",
+        remark: null,
+        carrierId: mapValue.carrierId,
+        state: mapValue.carrierName,
+      };
+      this.$confirm("车牌号("+mapValue.capacityNumber+")与承运商未有绑定关系, 是否立即绑定该车牌号和承运商?","提示",{
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+      })
+      .then(() => {
+          this.axios
+            .post("/api/v1/rms/insertCapacity", RmsCapacity)
+            .then((res) => {
+              console.log("res",res)
+              if (res.data.data == 0) {
+                this.$message.success("该车牌号与承运商绑定关系成功!");
+              } 
+            });
+        })
+        .catch(() => {this.$message({ type: "info", message: "已取消删除",});});
+    },
+    //确定车牌号与承运商是否有绑定关系
+    checkRelationship(index){
+      if(this.selectionList[index].carrierId!=null){
+        //暂存车牌号
+      var capacityNumber1;
+      if(this.isVehicleNumber(this.selectionList[index].capacityNumber)){
+        let mapValue = {
+        capacityNumber:this.selectionList[index].capacityNumber,
+        carrierId:this.selectionList[index].carrierId,
+        carrierName:this.selectionList[index].carrierName
+      }
+      this.axios
+       .post("/api/v1/uc/isInCapacityCarrier", mapValue)
+       .then((res)=>{
+         if(res.data.code=="201"){
+           capacityNumber1 = res.data.data;
+           if(capacityNumber1==null){
+             this.selectionList[index].capacityNumber = null;
+             this.$message.error("该车牌号未注册,请先前往注册!");
+           }else{
+             this.bindRelationship(mapValue);
+           }
+         }
+       });
+      }
+      }
+    },
+    //车牌号弹出层
+    handleSelect(item) {
+      console.log("获取下拉值!")
+    },
+
+    //以下是车牌号边输边查搜索
+    querySearch(queryString, cb){
+      this.axios
+        .post("/api/v1/uc/getCapacityByLike?index=" + queryString)
+        .then((res) => {
+          if (res.data.code == "200") {
+            var restaurants = res.data.data;
+            var results = queryString
+              ? restaurants.filter(this.createFilter(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以上是车牌号边输边查搜索
+
+    //点击确定按钮的事件
+    makeSure(){
+      //是否可发送请求
+      var canSend = 1;
+      this.selectionList.forEach((e)=>{
+          if(e.carrierName==null){
+              canSend = 0;
+          }
+          if(isIntegerNumber(e.carrierName)){
+              e.carrierId = e.carrierName;
+          }
+        });
+      if(canSend==0){
+          //还有车序号未授权承运商
+          this.$message.warning('还有车序号未授权承运商!')
+      }else{
+          this.$confirm("是否确定进行钢材派单!", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+              center: true,
+            })
+            .then(() => {
+              var mapList = [];
+              for(var i=0;i<this.spanArr.length;i++){
+                  if(this.spanArr[i]>0){
+                  //从所有选中承运商Id和承运商名称暂存中取出当前行的承运商Id
+                  this.carrierIdAndName.forEach((item) => {
+                    if(this.selectionList[i].carrierName==item.carrierName){
+                      this.selectionList[i].carrierId = item.carrierId;
+                    }
+                  })
+                  var mapItem = {
+                  //车牌号
+                  capacityNumber : null,
+                  //车序号主键
+                  saleOrderMaterialId : 0,
+                  //承运商Id
+                  carrierId : 0,
+                  //线路Id
+                  lineId : 0,
+                }
+                mapItem.capacityNumber = this.selectionList[i].capacityNumber,
+                mapItem.saleOrderMaterialId = this.selectionList[i].saleOrderMaterialId,
+                mapItem.carrierId = this.selectionList[i].carrierId,
+                mapItem.lineId = this.selectionList[i].lineId,
+                mapList.push(mapItem);
+                }
+              }
+              this.axios.post('/api/v1/ams/dispatchSteelOrder',mapList)
+              .then((res)=>{
+                  if(res.data.code == '200'){
+                  this.cancel();
+                }
+                  this.$message.success('派单成功!')               
+              });
+            })
+            .catch(() => {
+              this.$message({ type: "info", message: "取消!",});
+            });
+      }
+    },
+    //点击取消按钮的事件
+    cancel(){
+      this.$router.push('/saleOrderSteelCar')
+    },
+
+    //批量修改内层值
+    batchUpdateValue(row,index){
+        for(var i=index;i<this.spanArr[index]+index;i++){
+          this.selectionList[i].capacityNumber=row.capacityNumber;
+          this.selectionList[i].carrierName=row.carrierName;
+        }
+    },
+    //初始化线路
+    initializeLine(){
+      for(var i=0;i<this.spanArr.length;i++){
+        if(this.spanArr[i]==1){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材单拼路线'+" "+'进厂-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110001;
+          }
+        }
+        if(this.spanArr[i]==2){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材二拼路线'+" "+'计皮-进厂-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110002;
+          }
+        }
+        if(this.spanArr[i]==3){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材三拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110003;
+          }
+        }
+        if(this.spanArr[i]==4){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材四拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110004;
+          }
+        }
+        if(this.spanArr[i]==5){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材五拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110005;
+          }
+        }
+        if(this.spanArr[i]==6){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材六拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110006;
+          }
+        }
+        if(this.spanArr[i]==7){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材七拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110007;
+          }
+        }
+        if(this.spanArr[i]==8){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材八拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110008;
+          }
+        }
+        if(this.spanArr[i]==9){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材九拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110009;
+          }
+        }
+        if(this.spanArr[i]==10){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材十拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110010;
+          }
+        }
+      }
+      
+    },
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+            if (i === 0) {
+                  this.spanArr.push(1);
+                  this.pos = 0
+            } else {
+                // 判断当前元素与上一个元素是否相同
+                if (data[i].truckNo === data[i - 1].truckNo) {
+                  this.spanArr[this.pos] += 1;
+                  this.spanArr.push(0);
+                } else {
+                  this.spanArr.push(1);
+                  this.pos = i;
+                }
+            }
+        }
+    },
+    //根据条件合并行
+    cellMerge({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 1) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 2) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 7) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 8) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 9) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 10) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 11) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 12) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+    },
+  },
+};
+</script>
+
+<style lang='scss'>
+.addSaleOrderSend {
+  .from {
+    margin-top: 20px;
+    .line {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 350px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+    }
+    .sendCar {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 70px;
+        margin-left: 10px;
+        margin-right: 10px;
+        margin-top: 10px;
+      }
+    }
+    .vehicle {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin-top: 20px;
+      .el-button {
+        width: 250px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+      .span {
+        width: 70px;
+      }
+    }
+  }
+  .tablecls{
+    margin-top: 20px;
+  }
+  .button_box{
+    display: flex;
+    justify-content: center;
+    margin: 20px;
+    .el-button{
+      width: 100px;
+      margin-left: 20px;
+    }
+  }
+}
+</style>

+ 713 - 0
src/views/appoint/components/saleContract/addSaleOrderSteelSendCarrier.vue

@@ -0,0 +1,713 @@
+<template>
+  <div class="addSaleOrderSend">
+    <page-title>新增销售订单钢材派车</page-title>
+    <!-- 派车表格 -->
+    <div class="selectionTable from">
+      <el-table
+        :data="selectionList"
+        border
+        style="width: 100%"
+        highlight-current-row
+        :span-method="cellMerge"
+      >
+        <el-table-column
+          v-for="(item, i) in tableTop"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          :width="item.width"
+          align="center"
+          show-overflow-tooltip
+        >
+          <template slot="scope" v-if="item.label !== '车牌号'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '承运商'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '件数'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '运输线路'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '运输单价'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '截止日期'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '收货客户'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '收货客户电话号码'">
+            <span>{{ item.label }}</span>
+          </template>
+          <!-- 插入输入框 -->
+          <template slot-scope="scope">
+            <template v-if="item.slot">
+              <!-- 车牌号 -->
+              <template v-if="item.prop == 'capacityNumber'">
+                <el-autocomplete
+                class="inline-input"
+                v-model="scope.row.capacityNumber"
+                :fetch-suggestions="querySearch"
+                placeholder="(必填)"
+                :trigger-on-focus="false"
+                @select="handleSelect"
+                @blur="checkRelationship(scope.$index)"
+                @change="batchUpdateValue(scope.row,scope.$index)"
+                ></el-autocomplete>
+              </template>
+
+              <!-- 承运商 -->
+              <template v-if="item.prop == 'carrierName'">
+                 <el-select v-model="scope.row.carrierName" placeholder="请选择"  
+                 @change="batchUpdateValue(scope.row,scope.$index)"
+                 disabled>
+                  <el-option
+                    v-for="item in carrierNameOptions[scope.$index]"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+              </template>
+
+              <!-- 物资件数 -->
+              <template v-if="item.prop == 'orderPlanWeight'">
+                <el-input
+                  class="textinput"
+                  @input="onInput"
+                  placeholder="(必填)"
+                  v-model.number="scope.row.orderPlanWeight"
+                  disabled
+                ></el-input>
+              </template>
+
+              <!-- 物资重量 -->
+              <template v-if="item.prop == 'materialWeight'">
+                <el-input
+                  class="textinput"
+                  v-model.number="scope.row.materialWeight"
+                  disabled
+                ></el-input>
+              </template>
+
+              <!-- 运输单价id -->
+              <template v-if="item.prop == 'priceValue'" >
+                <el-input
+                  v-model="scope.row.priceValue"
+                  disabled
+                >
+                </el-input>
+              </template>
+              <!-- 截止日期 -->
+              <template v-if="item.prop == 'saleDateOfReceipt'">
+                 <el-date-picker
+                  class="textinput3"
+                  type="date"
+                  v-model.number="scope.row.saleDateOfReceipt"
+                  style="width:135px"
+                  disabled
+                ></el-date-picker>
+              </template>
+              <!-- 收货客户 -->
+              <template v-if="item.prop == 'saleOrderConsignee'">
+                <el-input
+                  class="textinput4"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsignee"
+                  disabled
+                ></el-input>
+              </template>
+              <!-- 收货客户电话号码 -->
+              <template v-if="item.prop == 'saleOrderConsigneeTel'">
+                <el-input
+                  class="textinput5"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsigneeTel"
+                  @input="onInput"
+                  disabled
+                ></el-input>
+              </template>
+            </template>
+            <template v-else>
+              <span>{{ scope.row[item.prop] }}</span>
+            </template>
+          </template>
+        </el-table-column>
+        <!-- 操作列 -->
+        <!-- <el-table-column fixed="right" label="操作" width="100">
+        </el-table-column> -->
+      </el-table>
+    </div>
+
+    <div class="button_box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+import { sjTime,isNumber,isIntegerNumber } from "@/utils/sharedJsFile";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      //存放每一行记录的合并数
+      spanArr: [],
+      //pos是spanArr的索引
+      pos:0,
+      //加载
+      selectLineLoading:false,
+      //承运商下拉框中的值
+      carrierNameOptions:[],
+      //当前车序号物资
+      selectionList:[],
+      tableTop: [
+        {
+          prop: "truckNo",
+          label: "车序号",
+          width: "50",
+        },
+        {
+          prop: "capacityNumber",
+          label: "车牌号",
+          width: "130",
+          slot: true,
+        },
+        {
+          prop: "carrierName",
+          label: "承运商",
+          width: "240",
+          slot: true,
+        },
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: "140",
+        },
+        {
+          prop: "Specification",
+          label: "规格型号",
+          width: "140",
+        },
+        {
+          prop: "orderPlanWeight",
+          label: "件数",
+          width: "80",
+          slot: true,
+        },
+        {
+          prop: "materialWeight",
+          label: "重量",
+          width: "80",
+          slot: true,
+        },
+        {
+          prop: "lineName",
+          label: "厂内运输线路",
+          width: "220",
+        },
+        {
+          prop: "saleDateOfReceipt",
+          label: "截止日期",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "saleShipperAddressName",
+          label: "收货地址",
+          width: "300",
+        },
+        {
+          prop: "priceValue",
+          label: "运输单价",
+          width: "80",
+          slot: true,
+        },
+        {
+          prop: "saleOrderConsignee",
+          label: "收货客户",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "saleOrderConsigneeTel",
+          label: "收货客户电话号码",
+          slot: true,
+          width: "150",
+        },
+        {
+          prop: "materialCode",
+          label: "物资编码",
+          width: "140",
+        },
+      ],
+    };
+  },
+  created(){
+    this.getValue();
+  },
+  methods: {
+    getValue(){
+      this.axios
+      .post("/api/v1/ams/getTruckNoAndMaterialList?saleOrderId=" + this.$route.params.saleOrderId)
+      .then((res)=>{
+        if(res.data.data.length==0){
+            this.$confirm("该销售订单尚未排车!是否先进行排车?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+              center: true,
+            })
+            .then(() => {
+              this.$router.push("/addSaleOrderArrange/" + this.$route.params.saleOrderId);
+            })
+            .catch(() => {
+              this.$message({ type: "info", message: "取消!",});
+            });
+        }
+        //赋值派车表格
+        res.data.data.forEach((e,i) => {
+          if(e.saleOrderConsignee=="null"){
+            e.saleOrderConsignee = null
+          }
+          if(e.saleOrderConsigneeTel=="null"){
+            e.saleOrderConsigneeTel = null
+          }
+            //带承运商初始化派车表格
+            var addmap = {
+                truckNo: e.truckNo,
+                saleOrderMaterialId: e.saleOrderMaterialId,
+                capacityNumber: null,
+                carrierName: e.carrierId,
+                carrierId: e.carrierId,
+                materialId: e.materialId,
+                materialName: e.materialName,
+                Specification: e.materialModelSpecification,
+                materialCode: e.materialCode,
+                orderPlanWeight: e.materialNumber,
+                materialWeight: e.materialWeight,
+                lineName:null,
+                lineId:null,
+                saleShipperAddressId: e.placeId,
+                saleShipperAddressName:e.place,
+                saleDateOfReceipt: e.receiptDate,
+                saleOrderConsignee: e.saleOrderConsignee,
+                saleOrderConsigneeTel: e.saleOrderConsigneeTel
+            };
+            this.selectionList.push(addmap);
+            //调用记录每一行的合并数的方法
+            this.getSpanArr(this.selectionList);
+            //初始化每个车的线路
+            this.initializeLine();
+        });
+      });
+    },
+    onInput(val){
+      if(!isNumber(val)){
+        this.$message.warning('重量/电话号码请输入数字')
+      }
+    },
+    //校验是否为车牌
+    isVehicleNumber(vehicleNumber) {
+      var result = false;
+      if(vehicleNumber!=null){
+        if (vehicleNumber.length == 7) {
+          var express =
+            /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;
+          result = express.test(vehicleNumber);
+        }
+      }
+      return result;
+    },
+    //绑定车牌号和承运商的关系
+    bindRelationship(mapValue){
+      let RmsCapacity = {
+        capacityTypeId: 1,
+        capacityNumber: mapValue.capacityNumber,
+        capacityCorlor: "黄",
+        capacityOwneris: "否",
+        capacityVip: "否",
+        capacityBlacklist: "否",
+        remark: null,
+        carrierId: mapValue.carrierId,
+        state: mapValue.carrierName,
+      };
+      this.$confirm("车牌号("+mapValue.capacityNumber+")与承运商未有绑定关系, 是否立即绑定该车牌号和承运商?","提示",{
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+      })
+      .then(() => {
+          this.axios
+            .post("/api/v1/rms/insertCapacity", RmsCapacity)
+            .then((res) => {
+              console.log("res",res)
+              if (res.data.data == 0) {
+                this.$message.success("该车牌号与承运商绑定关系成功!");
+              } 
+            });
+        })
+        .catch(() => {this.$message({ type: "info", message: "已取消删除",});});
+    },
+    //失焦事件后确定车牌号与承运商是否有绑定关系
+    checkRelationship(index){
+      if(this.selectionList[index].carrierId!=null){
+        //暂存车牌号
+      var capacityNumber1;
+      if(this.isVehicleNumber(this.selectionList[index].capacityNumber)){
+        let mapValue = {
+        capacityNumber:this.selectionList[index].capacityNumber,
+        carrierId:this.selectionList[index].carrierId,
+        carrierName:this.selectionList[index].carrierName
+      }
+      this.axios
+       .post("/api/v1/uc/isInCapacityCarrier", mapValue)
+       .then((res)=>{
+         if(res.data.code=="201"){
+           capacityNumber1 = res.data.data;
+           if(capacityNumber1==null){
+             this.selectionList[index].capacityNumber = null;
+             this.$message.error("该车牌号未注册,请先前往注册!");
+           }else{
+             this.bindRelationship(mapValue);
+           }
+         }
+       });
+      }
+      }
+    },
+    //车牌号弹出层
+    handleSelect(item) {
+      console.log("item")
+        // let mapValue = {
+        //   capacityNumber:item.capacityNumber,
+        //   carrierId:this.receiveCarrierId,
+        //   carrierName:this.receiveCarrierName
+        // }
+        // this.axios
+        // .post("/api/v1/uc/isInCapacityCarrier", mapValue)
+        // .then((res)=>{
+        //   if(res.data.code=="201"){
+        //     this.bindRelationship(mapValue);
+        //   }
+        // });
+    },
+
+    //以下是车牌号边输边查搜索
+    querySearch(queryString, cb){
+      this.axios
+        .post("/api/v1/uc/getCapacityByLike?index=" + queryString)
+        .then((res) => {
+          if (res.data.code == "200") {
+            var restaurants = res.data.data;
+            var results = queryString
+              ? restaurants.filter(this.createFilter(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以上是车牌号边输边查搜索
+
+    //点击确定按钮的事件
+    makeSure(){
+      //是否可发送请求
+      var canSend = 1;
+      this.selectionList.forEach((e)=>{
+          if(e.carrierName==null){
+              canSend = 0;
+          }
+          if(isIntegerNumber(e.carrierName)){
+              e.carrierId = e.carrierName;
+          }
+        });
+      if(canSend==0){
+          //还有车序号未授权承运商
+          this.$message.warning('还有车序号未授权承运商!')
+      }else{
+          this.$confirm("是否确定进行钢材派单!", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+              center: true,
+            })
+            .then(() => {
+              var mapList = [];
+              for(var i=0;i<this.spanArr.length;i++){
+                if(this.spanArr[i]>0&&this.selectionList[i].capacityNumber){
+                  var mapItem = {
+                  //车牌号
+                  capacityNumber : null,
+                  //车序号主键
+                  saleOrderMaterialId : 0,
+                  //承运商Id
+                  carrierId : 0,
+                  //线路Id
+                  lineId : 0,
+                }
+                mapItem.capacityNumber = this.selectionList[i].capacityNumber,
+                mapItem.saleOrderMaterialId = this.selectionList[i].saleOrderMaterialId,
+                mapItem.carrierId = this.selectionList[i].carrierId,
+                mapItem.lineId = this.selectionList[i].lineId,
+                mapList.push(mapItem);
+                }
+              }
+              this.axios.post('/api/v1/ams/dispatchSteelOrder',mapList)
+              .then((res)=>{
+                  if(res.data.code == '200'){
+                  this.cancel();
+                }
+                  this.$message.success('派单成功!')               
+              });
+            })
+            .catch(() => {
+              this.$message({ type: "info", message: "取消!",});
+            });
+      }
+    },
+    //点击取消按钮的事件
+    cancel(){
+      this.$router.push('/saleOrderSteelCarrier')
+    },
+
+    //批量修改内层值
+    batchUpdateValue(row,index){
+        for(var i=index;i<this.spanArr[index]+index;i++){
+          this.selectionList[i].capacityNumber=row.capacityNumber;
+        }
+    },
+    //初始化线路
+    initializeLine(){
+      for(var i=0;i<this.spanArr.length;i++){
+        if(this.spanArr[i]==1){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材单拼路线'+" "+'进厂-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110001;
+          }
+        }
+        if(this.spanArr[i]==2){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材二拼路线'+" "+'计皮-进厂-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110002;
+          }
+        }
+        if(this.spanArr[i]==3){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材三拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110003;
+          }
+        }
+        if(this.spanArr[i]==4){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材四拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110004;
+          }
+        }
+        if(this.spanArr[i]==5){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材五拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110005;
+          }
+        }
+        if(this.spanArr[i]==6){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材六拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110006;
+          }
+        }
+        if(this.spanArr[i]==7){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材七拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110007;
+          }
+        }
+        if(this.spanArr[i]==8){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材八拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110008;
+          }
+        }
+        if(this.spanArr[i]==9){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材九拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110009;
+          }
+        }
+        if(this.spanArr[i]==10){
+          for(var j=i;j<this.spanArr[i]+i;j++){
+            this.selectionList[j].lineName = '总厂:销售钢材十拼路线'+" "+'进厂-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-计皮-装货-计毛-出厂';
+            this.selectionList[j].lineId = 110010;
+          }
+        }
+      }
+      
+    },
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+            if (i === 0) {
+                  this.spanArr.push(1);
+                  this.pos = 0
+            } else {
+                // 判断当前元素与上一个元素是否相同
+                if (data[i].truckNo === data[i - 1].truckNo) {
+                  this.spanArr[this.pos] += 1;
+                  this.spanArr.push(0);
+                } else {
+                  this.spanArr.push(1);
+                  this.pos = i;
+                }
+            }
+        }
+    },
+    //根据条件合并行
+    cellMerge({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 1) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 2) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 7) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 8) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 9) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 10) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 11) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 12) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+    },
+  },
+};
+</script>
+
+<style lang='scss'>
+.addSaleOrderSend {
+  .from {
+    margin-top: 20px;
+    .line {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 350px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+    }
+    .sendCar {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 70px;
+        margin-left: 10px;
+        margin-right: 10px;
+        margin-top: 10px;
+      }
+    }
+    .vehicle {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin-top: 20px;
+      .el-button {
+        width: 250px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+      .span {
+        width: 70px;
+      }
+    }
+  }
+  .tablecls{
+    margin-top: 20px;
+  }
+  .button_box{
+    display: flex;
+    justify-content: center;
+    margin: 20px;
+    .el-button{
+      width: 100px;
+      margin-left: 20px;
+    }
+  }
+}
+</style>

+ 90 - 79
src/views/appoint/components/saleContract/addTransportPrice.vue

@@ -8,8 +8,8 @@
       </div> 
       </div> 
       <div class="liulan">
       <div class="liulan">
           <el-button type="primary" class="btn" @click="oilPriceFormulaClick">浏览</el-button>
           <el-button type="primary" class="btn" @click="oilPriceFormulaClick">浏览</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="btn1" @click="ondrawerOut">选择</el-button>
+          <!-- <el-button type="primary" class="btn1" @click="addressClick">浏览</el-button> -->
       </div>
       </div>
     </div>
     </div>
     <div class="elForm">
     <div class="elForm">
@@ -66,35 +66,30 @@
         </vue-scroll>
         </vue-scroll>
       </div>
       </div>
     </el-drawer>
     </el-drawer>
-    <!-- 地址模态框 -->
-    <el-drawer
-      title="请选择收货地址"
-      :visible.sync="addresDrawer"
-      :direction="direction"
-      :before-close="handleClose"
-      close-on-press-escape
-      wrapperClosable
-      modal
-      size="40%"
-    >
-      <div class="selectText">
-        <!-- <span></span> -->
-        <el-input v-model="addresText" placeholder="请输入内容"></el-input>
-        <el-button type="primary" @click="selectAddresClick" :loading="selectLineLoading"><i class="el-icon-search"></i>查询</el-button>
-         <!-- 已选中 省市(区)县 -->
-         <el-form :inline="true" style="margin-top: 0.5rem;">
+
+    <!-- 收货地址弹出框 -->
+    <el-dialog title="收货地址" :visible.sync="drawer1" width="90%">
+      <el-form :inline="true">
+        <el-form-item>
+            <label class="el-form-item__label" style="width: auto;">省</label>
+            <el-select v-model="province" filterable placeholder="请选择" @change="onchangeProvince">
+              <el-option v-for="item in provinceList" :key="item.id" :label="item.addressProvince" :value="item.id"></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item>
           <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">已选中省市县(区):</label>
+            <label class="el-form-item__label" style="width: auto;">市</label>
+            <el-select v-model="city" filterable placeholder="请选择" @change="onchangeCity">
+              <el-option v-for="item in cityList" :key="item.id" :label="item.addressDistrict" :value="item.id"></el-option>
+            </el-select>
           </el-form-item>
           </el-form-item>
           <el-form-item>
           <el-form-item>
-              <el-input class="el-form-item__content" v-model="address" placeholder="请输入内容" :disabled="true"></el-input>
+            <label class="el-form-item__label" style="width: auto;">县(区)</label>
+            <el-select v-model="county" filterable placeholder="请选择" @change="onchangeCounty">
+              <el-option v-for="item in countyList" :key="item.id" :label="item.addressTown" :value="item.id"></el-option>
+            </el-select>
           </el-form-item>
           </el-form-item>
-         </el-form>
-         <!-- 具体收货地址 -->
-         <div v-if="address != null">
-           <el-form :inline="true" style="margin-top: 0.5rem;" >
-
-          <el-form-item label="具体收货地址:">
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto;">具体收货地址</label>
             <el-autocomplete
             <el-autocomplete
               class="inline-input"
               class="inline-input"
               v-model="place"
               v-model="place"
@@ -104,26 +99,14 @@
               @select="handleSelect1"
               @select="handleSelect1"
             >
             >
             </el-autocomplete>
             </el-autocomplete>
-          </el-form-item> 
-
-          <el-button type="primary" @click="specificAddress">确定</el-button>
-         </el-form>
-         </div>
-         
-      </div>
-      <div class="LineTable">
-        <vue-scroll :ops="ops" style="width:100%;height:100%">
-          <dilTable 
-            v-bind.sync="addres"
-            @radio-change="currentRadioChange1"
-            :isKuang="isKuang"
-            :loading="tableLoading"
-            :drawer="addresDrawer"
-            @func="func"
-          ></dilTable>
-        </vue-scroll>
+          </el-form-item>
+      </el-form>
+      <div slot="footer" class="button-box">
+        <el-button @click="drawer1 = false">取 消</el-button>
+        <el-button type="primary" @click="specificAddress">确定</el-button>
       </div>
       </div>
-    </el-drawer>
+    </el-dialog>
+
   </div>
   </div>
 </template>
 </template>
 
 
@@ -134,18 +117,12 @@ export default {
   components: { PageTitle },
   components: { PageTitle },
   data() {
   data() {
     return {
     return {
-      //已选中 省市县(区)
-      address:null,
       //具体收货地址
       //具体收货地址
       place:null,
       place:null,
       //承运商名称
       //承运商名称
       state: null,
       state: null,
       //承运商id
       //承运商id
       carrierIds: null,
       carrierIds: null,
-      //是否打开收货地址模态框
-      addresDrawer:false,
-      //收货地址查询条件
-      addresText:null,
       //收货地址id
       //收货地址id
       addressId:null,
       addressId:null,
       //收货地址模态框数据
       //收货地址模态框数据
@@ -154,7 +131,20 @@ export default {
         requestUrl:"",
         requestUrl:"",
         selectionType: "radio",
         selectionType: "radio",
       },
       },
-
+      //是否打开收货地址弹出框
+      drawer1:false,
+      //所有省
+      provinceList: [],
+      //选中的省
+      province: '',
+      //所有市
+      cityList: [],
+      //选中的市
+      city: '',
+      //所有的县(区)
+      countyList: [],
+      //选中的县
+      county: '',
       //是否点击查询
       //是否点击查询
       isKuang:false,
       isKuang:false,
       //表格加载状态
       //表格加载状态
@@ -178,9 +168,10 @@ export default {
       direction: 'rtl',
       direction: 'rtl',
       //表单数据
       //表单数据
       form1: {
       form1: {
+        shipperId:1,
         priceDate:new Date(),
         priceDate:new Date(),
         oilTypeId:10,
         oilTypeId:10,
-        capacityTypeId:1
+        capacityTypeId:1,
       },
       },
       //提交给后端的数据
       //提交给后端的数据
       // map:{},
       // map:{},
@@ -207,7 +198,6 @@ export default {
       )
       )
       .then((res) => {
       .then((res) => {
         if (res.data.code == "200") {
         if (res.data.code == "200") {
-          console.log(res.data.data);
           if (res.data.data) {
           if (res.data.data) {
             this.state = res.data.data.carrierName;
             this.state = res.data.data.carrierName;
             this.carrierIds = res.data.data.carrierId;
             this.carrierIds = res.data.data.carrierId;
@@ -215,21 +205,48 @@ export default {
         }
         }
       });
       });
   },
   },
+  created(){
+    //获取所有的省
+    this.getAllProvince();
+  },
   methods: {
   methods: {
     func(res){
     func(res){
         this.selectLineLoading = false;
         this.selectLineLoading = false;
         this.isKuang = false;
         this.isKuang = false;
         this.tableLoading = false;
         this.tableLoading = false;
     },
     },
-    selectAddresClick(){
-      this.tableLoading = true;
-      this.selectLineLoading = true;
-      this.isKuang = true;
-      if(this.addresText){
-        this.addres.requestUrl = "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con="+this.addresText;
-      }else{
-        this.addres.requestUrl = "/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=" + new Date();
+    //点击外层收货地址选择事件
+    ondrawerOut(){
+      this.drawer1 = true;
+    },
+    //获取所有省数据
+    getAllProvince(){
+      this.axios.post('/api/v1/uc/getAllProvince').then((res)=>{
+        this.provinceList = res.data.data;
+      })
+    },
+    //省改变
+    onchangeProvince(){
+      this.axios.post('/api/v1/uc/getDistrictByProvince?addressProvince='+this.province).then((res)=>{
+        this.cityList = res.data.data;
+      })
+    },
+    //市改变
+    onchangeCity(){
+      this.axios.post('/api/v1/uc/getTownByDistrict?addressDistrict='+this.city).then((res)=>{
+        this.countyList = res.data.data;
+      })
+    },
+    //县(区)改变
+    onchangeCounty(){
+      let mapValue = {
+        addressProvince : this.province,
+        addressDistrict : this.city,
+        addressTown : this.county
       }
       }
+      this.axios.post('/api/v1/uc/getPlaceByAllAddress',mapValue).then((res)=>{
+        this.addressId = res.data.data[0].addressId;
+      })
     },
     },
     selectLineClick(){
     selectLineClick(){
       this.tableLoading = true;
       this.tableLoading = true;
@@ -256,9 +273,7 @@ export default {
         .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
         .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
         .then((res) => {
         .then((res) => {
           if (res.data.code == "200") {
           if (res.data.code == "200") {
-            // console.log(res.data.data);
             var restaurants = res.data.data;
             var restaurants = res.data.data;
-            // console.log(restaurants, "restaurants");
             var results = queryString
             var results = queryString
               ? restaurants.filter(this.createFilter(queryString))
               ? restaurants.filter(this.createFilter(queryString))
               : restaurants;
               : restaurants;
@@ -326,10 +341,6 @@ export default {
       this.formulaString = val.formulaString;
       this.formulaString = val.formulaString;
       this.oilPriceFormulaId = val.formulaId;
       this.oilPriceFormulaId = val.formulaId;
     },
     },
-    currentRadioChange1(val){
-      this.address = val.address,
-      this.addressId = val.addressId;
-    },
     //具体地址确定
     //具体地址确定
     specificAddress(){
     specificAddress(){
       let mapvalue = {
       let mapvalue = {
@@ -339,34 +350,26 @@ export default {
         cargonameId : this.oilPriceFormulaId,
         cargonameId : this.oilPriceFormulaId,
         priceValue : this.form1.priceValue,
         priceValue : this.form1.priceValue,
         priceDate : this.form1.priceDate,
         priceDate : this.form1.priceDate,
-        addressName:this.address +''+ this.place,
+        addressName:this.province+this.city+this.county+this.place,
         type : this.form1.type,
         type : this.form1.type,
         oilpriceBase : this.form1.oilpriceBase,
         oilpriceBase : this.form1.oilpriceBase,
         oilTypeId : this.form1.oilTypeId,
         oilTypeId : this.form1.oilTypeId,
         oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold
         oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold
       }
       }
       this.form1 = mapvalue;
       this.form1 = mapvalue;
-      this.addresDrawer = false;
+      this.drawer1 = false;
     },
     },
     //打开线路的模态窗口
     //打开线路的模态窗口
     oilPriceFormulaClick(){
     oilPriceFormulaClick(){
       this.oilPriceFormulaDrawer = true;
       this.oilPriceFormulaDrawer = true;
       this.oilPriceFormula.requestUrl = "/api/v1/uc/getOilFormula?apiId=444"
       this.oilPriceFormula.requestUrl = "/api/v1/uc/getOilFormula?apiId=444"
     },
     },
-    addressClick(){
-      this.addresDrawer = true;
-      this.addres.requestUrl = "/api/v1/ams/getAddressDeliveryAddress?apiId=255"
-    },
     //模态窗口关闭时调用
     //模态窗口关闭时调用
     handleClose(){
     handleClose(){
       if(this.oilPriceFormulaDrawer){
       if(this.oilPriceFormulaDrawer){
         this.oilPriceFormulaDrawer = false;
         this.oilPriceFormulaDrawer = false;
         this.LineText = null;
         this.LineText = null;
       }
       }
-      if(this.addresDrawer){
-        this.addresDrawer = false;
-        this.addresText = null;
-      }
     },
     },
     makeSure() {
     makeSure() {
       let mapValue={
       let mapValue={
@@ -404,6 +407,14 @@ export default {
 .elForm {
 .elForm {
     margin-left: 30%;
     margin-left: 30%;
   }
   }
+.button-box{
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 0.3125rem;
+  margin-bottom: 1.25rem;
+}
 .addTransportPrice{
 .addTransportPrice{
   .form{
   .form{
     display: flex;
     display: flex;

+ 29 - 121
src/views/appoint/components/saleContract/saleOrder.vue

@@ -2,36 +2,35 @@
   <!-- 销售订单页面 -->
   <!-- 销售订单页面 -->
   <div class="salePlan">
   <div class="salePlan">
     <div class="top">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-input placeholder="请输入内容" v-model="input" style="width:250px" clearable> </el-input>
           <el-button type="primary" class="btn" @click="onclick">
           <el-button type="primary" class="btn" @click="onclick">
-            <i class="el-icon-search"></i>查询
-          </el-button>
-          <el-button type="primary" @click="btnclick(0)">
-            <i class="el-icon-plus"></i>钢材订单新增
+          <i class="el-icon-search"></i>查询
           </el-button>
           </el-button>
           <el-button type="primary" @click="refresh">
           <el-button type="primary" @click="refresh">
             <i class="el-icon-refresh"></i>刷新
             <i class="el-icon-refresh"></i>刷新
           </el-button>
           </el-button>
-      <!-- <el-form :inline="true">
-        <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">时间段</label>
-            <el-date-picker
-            v-model="startDate"
-            type="date"
-            placeholder="开始日期">
-        </el-date-picker>
-        </el-form-item>
-        <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">至</label>
-            <el-date-picker
-            v-model="endDate"
-            type="date"
-            placeholder="结束日期">
-        </el-date-picker>
-        </el-form-item>
-        <el-form-item>
-        </el-form-item>
-      </el-form> -->
+          <!-- <el-form :inline="true">
+            <el-form-item>
+              <label class="el-form-item__label" style="width: auto;">时间段</label>
+                <el-date-picker
+                v-model="startDate"
+                type="date"
+                placeholder="开始日期"
+                style="width:200px">
+            </el-date-picker>
+            </el-form-item>
+            <el-form-item>
+              <label class="el-form-item__label" style="width: auto;">至</label>
+                <el-date-picker
+                v-model="endDate"
+                type="date"
+                placeholder="结束日期"
+                style="width:200px">
+            </el-date-picker>
+            </el-form-item>
+            <el-form-item>
+            </el-form-item>
+          </el-form> -->
     </div>
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <!-- 已审批 -->
       <!-- 已审批 -->
@@ -80,94 +79,6 @@
         </el-table-column>
         </el-table-column>
         </dilTable>
         </dilTable>
       </el-tab-pane>
       </el-tab-pane>
-      <!-- 未上报 -->
-      <el-tab-pane label="未上报" name="first">
-        <dilTable v-bind.sync="option" ref="table3">
-          <el-table-column fixed="right" label="操作" align="center" width="200">
-            <template slot-scope="scope">
-              <el-button
-                @click="uploadclick(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >上传</el-button
-              >
-              <el-button
-                @click="click(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >修改</el-button
-              >
-              <el-button
-                type="text"
-                size="small"
-                @click="deleteclick(scope.row.saleOrderId)"
-                >删除</el-button
-              >
-              <el-button
-                @click="detailclick3(scope.row)"
-                type="text"
-                size="small"
-                >物资详情</el-button
-              >
-            </template>
-          </el-table-column>
-        <!-- 物资详情抽屉 -->
-        <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData3" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
-
-        </dilTable>
-      </el-tab-pane>
-      <!-- 已下发 -->
-      <el-tab-pane label="已上报" name="second">
-        <dilTable v-bind.sync="option2" ref="table2">
-        <el-table-column fixed="right" label="操作" width="70">
-            <template slot-scope="scope">
-              <el-button
-                @click="detailclick2(scope.row)"
-                type="text"
-                size="small"
-                >物资详情</el-button
-              >
-            </template>
-          </el-table-column>
-        <!-- 物资详情抽屉 -->
-        <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData2" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
-
-        </dilTable>
-      </el-tab-pane>
       
       
     </el-tabs>
     </el-tabs>
   </div>
   </div>
@@ -181,8 +92,8 @@ export default {
       // shiyHeigth:140,
       // shiyHeigth:140,
       // isHeigth:true,
       // isHeigth:true,
       // isKuang:false,
       // isKuang:false,
-      // startDate : new Date().getTime() - 3600 * 1000 * 24 * 3,
-      // endDate : new Date(),
+      startDate : new Date().getTime() - 3600 * 1000 * 24 * 85,
+      endDate : new Date(),
       activeName: "four",
       activeName: "four",
       input: "",
       input: "",
       option: {
       option: {
@@ -203,8 +114,8 @@ export default {
       option4: {
       option4: {
         // 表格请求数据的地址
         // 表格请求数据的地址
         requestUrl:
         requestUrl:
-          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409",
-          //&shipperId=2&startDate="+sjTime(this.startDate)+"&endDate="+sjTime(this.endDate)
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=2"
+          // &startDate="+sjTime(new Date().getTime() - 3600 * 1000 * 24 * 85)+"&endDate="+sjTime(new Date()),
       },
       },
       
       
       //记录旧的row对象 (销售公司已审批)
       //记录旧的row对象 (销售公司已审批)
@@ -268,15 +179,12 @@ export default {
       }else if(this.activeName == "second"){
       }else if(this.activeName == "second"){
         this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
         this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
       }else if(this.activeName == "four"){
       }else if(this.activeName == "four"){
-        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&con="+this.input;      
+        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=2&con="+this.input;      
       }
       }
     },
     },
     seeclick(saleOrderId) {
     seeclick(saleOrderId) {
       this.$router.push("/saleOrderDetail/" + saleOrderId);
       this.$router.push("/saleOrderDetail/" + saleOrderId);
     },
     },
-    btnclick() {
-      this.$router.push("/addSaleOrder");
-    },
     click(saleOrderId) {
     click(saleOrderId) {
       this.$router.push("/editSaleOrder/" + saleOrderId);
       this.$router.push("/editSaleOrder/" + saleOrderId);
     },
     },

+ 4 - 95
src/views/appoint/components/saleContract/saleOrderCoproduct.vue

@@ -55,94 +55,6 @@
 
 
         </dilTable>
         </dilTable>
       </el-tab-pane>
       </el-tab-pane>
-      <!-- 未上报 -->
-      <el-tab-pane label="未上报" name="first">
-        <dilTable v-bind.sync="option" ref="table3">
-          <el-table-column fixed="right" label="操作" align="center" width="200">
-            <template slot-scope="scope">
-              <el-button
-                @click="uploadclick(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >上传</el-button
-              >
-              <el-button
-                @click="click(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >修改</el-button
-              >
-              <el-button
-                type="text"
-                size="small"
-                @click="deleteclick(scope.row.saleOrderId)"
-                >删除</el-button
-              >
-              <el-button
-                @click="detailclick3(scope.row)"
-                type="text"
-                size="small"
-                >物资详情</el-button
-              >
-            </template>
-          </el-table-column>
-        <!-- 物资详情抽屉 -->
-        <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData3" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
-
-        </dilTable>
-      </el-tab-pane>
-      <!-- 已下发 -->
-      <el-tab-pane label="已上报" name="second">
-        <dilTable v-bind.sync="option2" ref="table2">
-        <el-table-column fixed="right" label="操作" width="70">
-            <template slot-scope="scope">
-              <el-button
-                @click="detailclick2(scope.row)"
-                type="text"
-                size="small"
-                >物资详情</el-button
-              >
-            </template>
-          </el-table-column>
-        <!-- 物资详情抽屉 -->
-        <el-table-column type="expand" width="1">
-          <template slot-scope="props">
-            <el-form label-position="center" inline class="demo-table-expand">
-              <div v-if="false">{{ props }}</div>
-              <div>
-                <el-table :data="tableData2" border >
-                  <el-table-column
-                    v-for="(item, i) in tableHead"
-                    :key="i"
-                    :prop="item.prop"
-                    :label="item.label"
-                    :width="item.width"
-                  ></el-table-column>
-                </el-table>
-              </div>
-            </el-form>
-          </template>
-        </el-table-column>
-
-        </dilTable>
-      </el-tab-pane>
       
       
     </el-tabs>
     </el-tabs>
     <!-- 承运商模态框 -->
     <!-- 承运商模态框 -->
@@ -162,7 +74,7 @@
       <el-button type="primary" @click="selectMakeSure">确定</el-button>
       <el-button type="primary" @click="selectMakeSure">确定</el-button>
       <div class="tablecls">
       <div class="tablecls">
         <!-- 查询所有的承运商 -->
         <!-- 查询所有的承运商 -->
-        <dilTable v-bind.sync="carrier" @radio-change="currentRadioChange">
+        <dilTable v-bind.sync="carrier" @radio-change="currentRadioChange" :drawer="drawer">
         </dilTable>
         </dilTable>
       </div>
       </div>
     </el-drawer>
     </el-drawer>
@@ -197,7 +109,7 @@ export default {
       option4: {
       option4: {
         // 表格请求数据的地址
         // 表格请求数据的地址
         requestUrl:
         requestUrl:
-          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409",
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1",
           selectionType: "select",
           selectionType: "select",
       },
       },
       carrier: {
       carrier: {
@@ -267,7 +179,7 @@ export default {
       }else if(this.activeName == "second"){
       }else if(this.activeName == "second"){
         this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
         this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
       }else if(this.activeName == "four"){
       }else if(this.activeName == "four"){
-        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&con="+this.input;      
+        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con="+this.input;      
       }
       }
     },
     },
     //模糊查询承运商
     //模糊查询承运商
@@ -320,7 +232,7 @@ export default {
             ).then((res) => {
             ).then((res) => {
               if(res.data.code=='0'){
               if(res.data.code=='0'){
                 this.$message({ type: "success",message: "授权成功!",});
                 this.$message({ type: "success",message: "授权成功!",});
-                this.$router.go(0);
+                this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&i="+new Date();
               }
               }
             });
             });
         })
         })
@@ -335,9 +247,6 @@ export default {
     seeclick(saleOrderId) {
     seeclick(saleOrderId) {
       this.$router.push("/saleOrderDetail/" + saleOrderId);
       this.$router.push("/saleOrderDetail/" + saleOrderId);
     },
     },
-    btnclick() {
-      this.$router.push("/addSaleOrder");
-    },
     click(saleOrderId) {
     click(saleOrderId) {
       this.$router.push("/editSaleOrder/" + saleOrderId);
       this.$router.push("/editSaleOrder/" + saleOrderId);
     },
     },

+ 1 - 1
src/views/appoint/components/saleContract/saleOrderCoproductCarrier.vue

@@ -121,7 +121,7 @@ export default {
     },
     },
     onclick() {
     onclick() {
       if(this.activeName == "four"){
       if(this.activeName == "four"){
-        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&con="+this.input;      
+        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con="+this.input;      
       }
       }
     },
     },
     coproductSendClick(saleOrderId){
     coproductSendClick(saleOrderId){

+ 446 - 0
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -0,0 +1,446 @@
+<template>
+  <!-- 销售订单页面 -->
+  <div class="salePlan">
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="btnclick(0)">
+        <i class="el-icon-plus"></i>钢材订单新增
+      </el-button>
+      <el-button type="primary" @click="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+    </div>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <!-- 未上报 -->
+      <el-tab-pane label="未上报" name="first">
+        <dilTable v-bind.sync="option" ref="table3">
+          <el-table-column fixed="right" label="操作" align="center" width="200">
+            <template slot-scope="scope">
+              <el-button
+                @click="uploadclick(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >上传</el-button
+              >
+              <!-- <el-button
+                @click="click(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >修改</el-button
+              > -->
+              <el-button
+                type="text"
+                size="small"
+                @click="deleteclick(scope.row.saleOrderId)"
+                >删除</el-button
+              >
+              <el-button
+                @click="detailclick3(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</el-button
+              >
+            </template>
+          </el-table-column>
+        <!-- 物资详情抽屉 -->
+        <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData3" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+
+        </dilTable>
+      </el-tab-pane>
+      <!-- 已审批 -->
+       <el-tab-pane label="已审批" name="four">
+        <dilTable v-bind.sync="option4" ref="table">
+          <el-table-column fixed="right" label="操作" width="80">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</el-button
+              >
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+        <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+
+        </dilTable>
+      </el-tab-pane>
+      <!-- 已上报 -->
+      <el-tab-pane label="已上报" name="second">
+        <dilTable v-bind.sync="option2" ref="table2">
+        <el-table-column fixed="right" label="操作" width="70">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick2(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</el-button
+              >
+            </template>
+          </el-table-column>
+        <!-- 物资详情抽屉 -->
+        <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData2" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+
+        </dilTable>
+      </el-tab-pane>
+      
+    </el-tabs>
+  </div>
+</template>
+<script>
+export default {
+  name: "saleOrder",
+  data() {
+    return {
+      activeName: "first",
+      drawer: false,
+      input: "",
+      index: "",
+      carrierId: null,
+      carrierName: null,
+      option: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getSaleOrderInfoes?apiId=408",
+      },
+      option2: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getSaleOrderReportedes?apiId=408",
+      },
+      option3: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409",
+      },
+      option4: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1",
+      },
+      mapList: [],
+      mapItemList:[],
+      //记录旧的row对象 (销售公司已审批)
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
+      oldRowCount: 1,
+      //记录旧的row对象 (财务已审批)
+      oldRow1: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (财务已审批)
+      oldRowCount1: 1,
+      //记录旧的row对象 (已上报)
+      oldRow2: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (已上报)
+      oldRowCount2: 1,
+      //记录旧的row对象 (未上报)
+      oldRow3: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (未上报)
+      oldRowCount3: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资件数",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          label: "物资重量",
+          width: 100,
+        },
+      ],
+      //(销售公司已审批)
+      tableData: [],
+      //(财务已审批)
+      tableData1: [],
+      //(已上报)
+      tableData2: [],
+      //(未上报)
+      tableData3: [],
+    };
+  },
+  methods: {
+    refresh(){
+      this.$router.go(0);
+    },
+    handleClick(tab, event) {
+      console.log(tab, event);
+    },
+    onclick() {
+      if(this.activeName == "first"){
+        this.option.requestUrl = "/api/v1/ams/getSaleOrderInfoes?apiId=408&con="+this.input;
+      }else if(this.activeName == "second"){
+        this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
+      }else if(this.activeName == "four"){
+        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con="+this.input;      
+      }
+    },
+    seeclick(saleOrderId) {
+      this.$router.push("/saleOrderDetail/" + saleOrderId);
+    },
+    btnclick() {
+      this.$router.push("/addSaleOrder");
+    },
+    click(saleOrderId) {
+      this.$router.push("/editSaleOrder/" + saleOrderId);
+    },
+    // -------查看物资详情 (已审批)
+    detailclick(row) {
+      // 记录重复点击次数
+      if (this.oldRow === row) {
+        this.oldRowCount += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow != "") {
+        if (this.oldRow != row) {
+          if (this.oldRowCount % 2 === 1) {
+            this.$refs.table.toggleRowExpansion(this.oldRow);
+          } else {
+            this.oldRowCount = 1;
+          }
+        } else {
+          this.oldRow = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (财务已审批)
+    detailclick1(row) {
+      // 记录重复点击次数
+      if (this.oldRow1 === row) {
+        this.oldRowCount1 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table1.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow1 != "") {
+        if (this.oldRow1 != row) {
+          if (this.oldRowCount1 % 2 === 1) {
+            this.$refs.table1.toggleRowExpansion(this.oldRow1);
+          } else {
+            this.oldRowCount1 = 1;
+          }
+        } else {
+          this.oldRow1 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow1 = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData1 = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (已上报)
+    detailclick2(row) {
+      // 记录重复点击次数
+      if (this.oldRow2 === row) {
+        this.oldRowCount2 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table2.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow2 != "") {
+        if (this.oldRow2 != row) {
+          if (this.oldRowCount2 % 2 === 1) {
+            this.$refs.table2.toggleRowExpansion(this.oldRow2);
+          } else {
+            this.oldRowCount2 = 1;
+          }
+        } else {
+          this.oldRow2 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow2 = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData2 = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (未上报)
+    detailclick3(row) {
+      // 记录重复点击次数
+      if (this.oldRow3 === row) {
+        this.oldRowCount3 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table3.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow3 != "") {
+        if (this.oldRow3 != row) {
+          if (this.oldRowCount3 % 2 === 1) {
+            this.$refs.table3.toggleRowExpansion(this.oldRow3);
+          } else {
+            this.oldRowCount3 = 1;
+          }
+        } else {
+          this.oldRow3 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow3 = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData3 = res.data.data;
+        });
+    },
+
+    // 上传
+    uploadclick(saleOrderId) {
+      this.$confirm("是否上传", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "上传成功!",
+          });
+          this.axios
+            .post(
+              "/api/v1/ams/uploadSaleOrder?saleOrderId=" +
+                saleOrderId
+            )
+            .then(() => {
+              this.$router.go(0);
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消上传!",
+          });
+        });
+    },
+    //删除
+    deleteclick(scope) {
+      let saleOrderId = scope;
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true,
+      })
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "删除成功!",
+          });
+          this.axios
+            .post(
+              "/api/v1/ams/deleteAmsSaleOrderBySaleOrderId?saleOrderId=" +
+                saleOrderId
+            )
+            .then(() => {
+              this.$router.go(0);
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消删除!",
+          });
+        });
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.salePlan {
+  .top {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 358 - 0
src/views/appoint/components/saleContract/saleOrderSteelCar.vue

@@ -0,0 +1,358 @@
+<template>
+  <!-- 销售订单页面 -->
+  <div class="salePlan">
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+    </div>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <!-- 未授权 -->
+       <el-tab-pane label="未授权" name="four">
+        <dilTable v-bind.sync="option4" ref="table">
+          <el-table-column fixed="right" label="操作" width="200">
+            <template slot-scope="scope">
+              <el-button
+                @click="empowerCarrierClick(scope.row.saleOrderMaterialId)"
+                type="text"
+                size="small"
+                >授权承运商</el-button
+              >
+              <el-button
+                @click="steelSendClick(scope.row.saleOrderMaterialId)"
+                type="text"
+                size="small"
+                >钢材派车</el-button
+              >
+              <el-button
+                @click="detailclick(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</el-button
+              >
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+        <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+
+        </dilTable>
+      </el-tab-pane>
+
+      <!-- 未派车 -->
+      <el-tab-pane label="未派车" name="five">
+        <dilTable v-bind.sync="option0" ref="table0">
+        <el-table-column fixed="right" label="操作" width="70">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick0(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</el-button
+              >
+            </template>
+          </el-table-column>
+        <!-- 物资详情抽屉 -->
+        <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData0" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+
+        </dilTable>
+      </el-tab-pane>
+      <!-- 已派车 -->
+      <el-tab-pane label="已派车" name="first">
+        <dilTable v-bind.sync="option" ref="table3">
+          <el-table-column fixed="right" label="操作" align="center" width="80">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick3(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</el-button
+              >
+            </template>
+          </el-table-column>
+        <!-- 物资详情抽屉 -->
+        <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData3" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+
+        </dilTable>
+      </el-tab-pane>
+      
+    </el-tabs>
+  </div>
+</template>
+<script>
+export default {
+  name: "saleOrder",
+  data() {
+    return {
+      activeName: "four",
+      drawer: false,
+      input: "",
+      index: "",
+      carrierId: null,
+      carrierName: null,
+      option: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getHaveCarTruckNoList?apiId=466",
+      },
+      option2: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getSaleOrderReportedes?apiId=408",
+      },
+      option3: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409",
+      },
+      option4: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getSteelTruckNoList?apiId=411",
+      },
+      option0: {
+        // 表格请求数据的地址
+        requestUrl:
+        "/api/v1/ams/getNoCarTruckNoList?apiId=466"
+      },
+      mapList: [],
+      mapItemList:[],
+      //记录旧的row对象 (销售公司已审批)
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
+      oldRowCount: 1,
+      //记录旧的row对象 (财务已审批)
+      oldRow1: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (财务已审批)
+      oldRowCount1: 1,
+      //记录旧的row对象 (已上报)
+      oldRow2: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (已上报)
+      oldRowCount2: 1,
+      //记录旧的row对象 (未上报)
+      oldRow3: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (未上报)
+      oldRowCount3: 1,
+      //记录旧的row对象 (未派车)
+      oldRow0: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (未派车)
+      oldRowCount0: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资件数",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          label: "物资重量",
+          width: 100,
+        },
+      ],
+      //(销售公司已审批)
+      tableData: [],
+      //(财务已审批)
+      tableData1: [],
+      //(已上报)
+      tableData2: [],
+      //(未上报)
+      tableData3: [],
+      //(未派车)
+      tableData0: [],
+    };
+  },
+  methods: {
+    refresh(){
+      this.$router.go(0);
+    },
+    handleClick(tab, event) {
+      console.log(tab, event);
+    },
+    onclick() {
+      if(this.activeName == "first"){
+        this.option.requestUrl = "/api/v1/ams/getSaleOrderInfoes?apiId=408&con="+this.input;
+      }else if(this.activeName == "second"){
+        this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
+      }else if(this.activeName == "four"){
+        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con="+this.input;      
+      }
+    },
+    seeclick(saleOrderId) {
+      this.$router.push("/saleOrderDetail/" + saleOrderId);
+    },
+    empowerCarrierClick(saleOrderMaterialId){
+      this.$router.push("/saleOrderSteelEmpower/" + saleOrderMaterialId);
+    },
+    steelSendClick(saleOrderMaterialId){
+      this.$router.push("/addSaleOrderSteelSend/" + saleOrderMaterialId);
+    },
+    // -------查看物资详情 (已审批)
+    detailclick(row) {
+      // 记录重复点击次数
+      if (this.oldRow === row) {
+        this.oldRowCount += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow != "") {
+        if (this.oldRow != row) {
+          if (this.oldRowCount % 2 === 1) {
+            this.$refs.table.toggleRowExpansion(this.oldRow);
+          } else {
+            this.oldRowCount = 1;
+          }
+        } else {
+          this.oldRow = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getTruckNoMaterialList?saleOrderMaterialId=" +row.saleOrderMaterialId)
+        .then((res) => {
+          this.tableData = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (已派车)
+    detailclick3(row) {
+      // 记录重复点击次数
+      if (this.oldRow3 === row) {
+        this.oldRowCount3 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table3.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow3 != "") {
+        if (this.oldRow3 != row) {
+          if (this.oldRowCount3 % 2 === 1) {
+            this.$refs.table3.toggleRowExpansion(this.oldRow3);
+          } else {
+            this.oldRowCount3 = 1;
+          }
+        } else {
+          this.oldRow3 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow3 = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getTruckNoMaterialList?saleOrderMaterialId=" +row.saleOrderMaterialId)
+        .then((res) => {
+          this.tableData3 = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (未派车)
+    detailclick0(row) {
+      // 记录重复点击次数
+      if (this.oldRow0 === row) {
+        this.oldRowCount0 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table0.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow0 != "") {
+        if (this.oldRow0 != row) {
+          if (this.oldRowCount0 % 2 === 1) {
+            this.$refs.table0.toggleRowExpansion(this.oldRow0);
+          } else {
+            this.oldRowCount0 = 1;
+          }
+        } else {
+          this.oldRow0 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow0 = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getTruckNoMaterialList?saleOrderMaterialId=" +row.saleOrderMaterialId)
+        .then((res) => {
+          this.tableData0 = res.data.data;
+        });
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.salePlan {
+  .top {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 185 - 0
src/views/appoint/components/saleContract/saleOrderSteelCarrier.vue

@@ -0,0 +1,185 @@
+<template>
+  <!-- 销售订单页面 -->
+  <div class="salePlan">
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+    </div>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <!-- 已审批 -->
+       <el-tab-pane label="已审批" name="four">
+        <dilTable v-bind.sync="option4" ref="table">
+          <el-table-column fixed="right" label="操作" width="200">
+            <template slot-scope="scope">
+              <el-button
+                @click="steelSendClick(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >钢材派车</el-button
+              >
+              <el-button
+                @click="detailclick(scope.row)"
+                type="text"
+                size="small"
+                >物资详情</el-button
+              >
+            </template>
+          </el-table-column>
+          <!-- 物资详情抽屉 -->
+        <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+
+        </dilTable>
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  name: "saleOrder",
+  data() {
+    return {
+      activeName: "four",
+      drawer: false,
+      input: "",
+      index: "",
+      carrierId: null,
+      carrierName: null,
+      option4: {
+        // 表格请求数据的地址
+        requestUrl:
+          "",
+      },
+      mapList: [],
+      mapItemList:[],
+      //记录旧的row对象 (销售公司已审批)
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
+      oldRowCount: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资件数",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          label: "物资重量",
+          width: 100,
+        },
+      ],
+      //(销售公司已审批)
+      tableData: [],
+    };
+  },
+  created(){
+      this.initUrl();
+  },
+  methods: {
+    initUrl(){
+        if (getCookie("orgCode") == "chengyunshang") {
+        this.option4.requestUrl =
+          "/api/v1/ams/getSaleOrderListToCarrier?apiId=467&carrierSsoId=" +
+          getCookie("userId");
+      } else {
+        this.option4.requestUrl =
+          "/api/v1/ams/getSaleOrderListToCarrier?apiId=467&carrierSsoId=" + null;
+      }
+    },
+    refresh(){
+      this.$router.go(0);
+    },
+    handleClick(tab, event) {
+      console.log(tab, event);
+    },
+    onclick() {
+      if(this.activeName == "first"){
+        this.option.requestUrl = "/api/v1/ams/getSaleOrderInfoes?apiId=408&con="+this.input;
+      }else if(this.activeName == "second"){
+        this.option2.requestUrl = "/api/v1/ams/getSaleOrderReportedes?apiId=408&con="+this.input;      
+      }else if(this.activeName == "four"){
+        this.option4.requestUrl = "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con="+this.input;      
+      }
+    },
+    seeclick(saleOrderId) {
+      this.$router.push("/saleOrderDetail/" + saleOrderId);
+    },
+    steelSendClick(saleOrderId){
+      this.$router.push("/addSaleOrderSteelSendCarrier/" + saleOrderId);
+    },
+    // -------查看物资详情 (已审批)
+    detailclick(row) {
+      // 记录重复点击次数
+      if (this.oldRow === row) {
+        this.oldRowCount += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow != "") {
+        if (this.oldRow != row) {
+          if (this.oldRowCount % 2 === 1) {
+            this.$refs.table.toggleRowExpansion(this.oldRow);
+          } else {
+            this.oldRowCount = 1;
+          }
+        } else {
+          this.oldRow = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData = res.data.data;
+        });
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.salePlan {
+  .top {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 532 - 0
src/views/appoint/components/saleContract/saleOrderSteelEmpower.vue

@@ -0,0 +1,532 @@
+<template>
+  <div class="addSaleOrderSend">
+    <page-title>销售钢材订单授权承运商</page-title>
+    <!-- 派车表格 -->
+    <div class="selectionTable from">
+      <el-table
+        :data="selectionList"
+        border
+        style="width: 100%"
+        highlight-current-row
+        :span-method="cellMerge"
+      >
+        <el-table-column
+          v-for="(item, i) in tableTop"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          :width="item.width"
+          align="center"
+          show-overflow-tooltip
+        >
+          <template slot="scope" v-if="item.label !== '承运商'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '件数'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '重量'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '运输线路'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '运输单价'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '截止日期'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '收货客户'">
+            <span>{{ item.label }}</span>
+          </template>
+          <template slot="scope" v-if="item.label !== '收货客户电话号码'">
+            <span>{{ item.label }}</span>
+          </template>
+          <!-- 插入输入框 -->
+          <template slot-scope="scope">
+            <template v-if="item.slot">
+
+              <!-- 承运商 -->
+              <template v-if="item.prop == 'carrierName'">
+                  <el-autocomplete
+                    class="inline-input"
+                    v-model="scope.row.carrierName"
+                    :fetch-suggestions="querySearch"
+                    placeholder="请输入承运商名称"
+                    :trigger-on-focus="false"
+                    @change="batchUpdateValue(scope.row,scope.$index)"
+                    @select="handleSelect"
+                  >
+                    <template slot-scope="{ item }">
+                      <div class="name" v-if="item.carrierName">
+                        {{ item.carrierName }}
+                      </div>
+                    </template>
+                  </el-autocomplete>
+              </template>
+
+              <!-- 物资件数 -->
+              <template v-if="item.prop == 'orderPlanWeight'">
+                <el-input
+                  class="textinput"
+                  @input="onInput"
+                  placeholder="(必填)"
+                  v-model.number="scope.row.orderPlanWeight"
+                  disabled
+                ></el-input>
+              </template>
+
+              <!-- 物资重量 -->
+              <template v-if="item.prop == 'materialWeight'">
+                <el-input
+                  class="textinput"
+                  v-model.number="scope.row.materialWeight"
+                  disabled
+                ></el-input>
+              </template>
+
+              <!-- 截止日期 -->
+              <template v-if="item.prop == 'saleDateOfReceipt'">
+                 <el-date-picker
+                  class="textinput3"
+                  type="date"
+                  v-model.number="scope.row.saleDateOfReceipt"
+                  style="width:135px"
+                  disabled
+                ></el-date-picker>
+              </template>
+              <!-- 收货客户 -->
+              <template v-if="item.prop == 'saleOrderConsignee'">
+                <el-input
+                  class="textinput4"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsignee"
+                  disabled
+                ></el-input>
+              </template>
+              <!-- 收货客户电话号码 -->
+              <template v-if="item.prop == 'saleOrderConsigneeTel'">
+                <el-input
+                  class="textinput5"
+                  placeholder="(非必填)"
+                  v-model.number="scope.row.saleOrderConsigneeTel"
+                  @input="onInput"
+                  disabled
+                ></el-input>
+              </template>
+            </template>
+            <template v-else>
+              <span>{{ scope.row[item.prop] }}</span>
+            </template>
+          </template>
+        </el-table-column>
+        <!-- 操作列 -->
+        <!-- <el-table-column fixed="right" label="操作" width="100">
+        </el-table-column> -->
+      </el-table>
+    </div>
+
+    <div class="button_box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure">确认授权</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+import { sjTime,isNumber,isIntegerNumber } from "@/utils/sharedJsFile";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      //存放每一行记录的合并数
+      spanArr: [],
+      //pos是spanArr的索引
+      pos:0,
+      //所有选中承运商Id和承运商名称暂存
+      carrierIdAndName: [],
+      //承运商下拉框中的值
+      carrierNameOptions:[],
+      //当前车序号物资
+      selectionList:[],
+      tableTop: [
+        {
+          prop: "truckNo",
+          label: "车序号",
+          width: "50",
+        },
+        {
+          prop: "carrierName",
+          label: "承运商",
+          width: "240",
+          slot: true,
+        },
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: "140",
+        },
+        {
+          prop: "Specification",
+          label: "规格型号",
+          width: "140",
+        },
+        {
+          prop: "materialCode",
+          label: "物资编码",
+          width: "140",
+        },
+        {
+          prop: "orderPlanWeight",
+          label: "件数",
+          width: "80",
+          slot: true,
+        },
+        {
+          prop: "materialWeight",
+          label: "重量",
+          width: "100",
+          slot: true,
+        },
+        {
+          prop: "saleDateOfReceipt",
+          label: "截止日期",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "saleShipperAddressName",
+          label: "收货地址",
+          width: "300",
+        },
+        {
+          prop: "saleOrderConsignee",
+          label: "收货客户",
+          width: "150",
+          slot: true,
+        },
+        {
+          prop: "saleOrderConsigneeTel",
+          label: "收货客户电话号码",
+          slot: true,
+          width: "150",
+        },
+      ],
+    };
+  },
+  created(){
+    this.getValue();
+  },
+  methods: {
+    getValue(){
+      this.axios
+      .post("/api/v1/ams/getTruckNoMaterial?saleOrderMaterialId=" + this.$route.params.saleOrderMaterialId)
+      .then((res)=>{
+        if(res.data.data.length==0){
+            this.$confirm("该销售订单尚未排车!是否先进行排车?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+              center: true,
+            })
+            .then(() => {
+              this.$router.push("/addSaleOrderArrange/" + this.$route.params.saleOrderId);
+            })
+            .catch(() => {
+              this.$message({ type: "info", message: "取消!",});
+            });
+        }
+        //赋值派车表格
+        res.data.data.forEach((e) => {
+          if(e.saleOrderConsignee=="null"){
+            e.saleOrderConsignee = null
+          }
+          if(e.saleOrderConsigneeTel=="null"){
+            e.saleOrderConsigneeTel = null
+          }
+          //判断是否已经定向派单
+          if(!e.carrierId){
+            //不带承运商初始化派车表格
+            var addmap = {
+                truckNo: e.truckNo,
+                saleOrderMaterialId: e.saleOrderMaterialId,
+                carrierName: null,
+                carrierId: null,
+                materialId: e.materialId,
+                materialName: e.materialName,
+                Specification: e.materialModelSpecification,
+                materialCode: e.materialCode,
+                orderPlanWeight: e.materialNumber,
+                materialWeight: e.materialWeight,
+                saleShipperAddressId: e.placeId,
+                saleShipperAddressName:e.place,
+                saleDateOfReceipt: e.receiptDate,
+                saleOrderConsignee: e.saleOrderConsignee,
+                saleOrderConsigneeTel: e.saleOrderConsigneeTel,
+            };
+            this.selectionList.push(addmap);
+            //调用记录每一行的合并数的方法
+            this.getSpanArr(this.selectionList);
+          }
+        });
+      });
+    },
+
+    //承运商弹出层
+    handleSelect(item) {
+      let carrierIdAndNameItem = {
+        carrierId : item.carrierId,
+        carrierName : item.carrierName
+      }
+      this.carrierIdAndName.push(carrierIdAndNameItem);
+    },
+    //以下是承运商边输边查搜索
+    querySearch(queryString, cb) {
+      this.axios
+        .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+        .then((res) => {
+          if (res.data.code == "200") {
+            var restaurants = res.data.data;
+            var results = queryString
+              ? restaurants.filter(this.createFilter(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以上是承运商边输边查搜索
+
+    onInput(val){
+      if(!isNumber(val)){
+        this.$message.warning('重量/电话号码请输入数字')
+      }
+    },
+
+    //点击确定按钮的事件
+    makeSure(){
+      //是否可发送请求
+      var canSend = 1;
+      if(this.selectionList.length>0){
+          this.selectionList.forEach((e)=>{
+          if(e.carrierName==null){
+              canSend = 0;
+          }
+          if(isIntegerNumber(e.carrierName)){
+              e.carrierId = e.carrierName;
+          }
+        });
+      }else{
+          canSend = -1;
+      }
+      if(canSend==0){
+          //还有车序号未授权承运商
+          this.$message.warning('还有车序号未授权承运商!')
+      }else if(canSend==-1){
+          this.$message.warning('该订单没有要授权承运商的车序号了!')
+      }else{
+          this.$confirm("请仔细确认是否授权这些承运商!", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+              center: true,
+            })
+            .then(() => {
+              var mapList = [];
+              //取得要发送的车序号和它的承运商
+              for(var i=0;i<this.spanArr.length;i++){
+                  if(this.spanArr[i]>0){
+                      //从所有选中承运商Id和承运商名称暂存中取出当前行的承运商Id
+                      this.carrierIdAndName.forEach((item) => {
+                        if(this.selectionList[i].carrierName==item.carrierName){
+                          this.selectionList[i].carrierId = item.carrierId;
+                        }
+                      })
+                      var oneCarAndCarrier = {
+                          //车序号Id
+                          saleOrderMaterialId : 0,
+                          //省市县id
+                          carrierId : 0,
+                      }
+                      oneCarAndCarrier.saleOrderMaterialId = this.selectionList[i].saleOrderMaterialId,
+                      oneCarAndCarrier.carrierId = this.selectionList[i].carrierId,
+                      mapList.push(oneCarAndCarrier);
+                  }
+              }
+              this.axios.post('/api/v1/ams/dispatchToCarrier',mapList)
+              .then((res)=>{
+                this.cancel();
+                 this.$message.success('授权成功!')               
+              });
+            })
+            .catch(() => {
+              this.$message({ type: "info", message: "取消!",});
+            });
+      }
+    },
+    //点击取消按钮的事件
+    cancel(){
+      this.$router.push('/saleOrderSteelCar')
+    },
+    //批量修改内层值
+    batchUpdateValue(row,index){
+      for(var i=index;i<this.spanArr[index]+index;i++){
+        this.selectionList[i].carrierName=row.carrierName;
+      }
+    },
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+            if (i === 0) {
+                  this.spanArr.push(1);
+                  this.pos = 0
+            } else {
+                // 判断当前元素与上一个元素是否相同
+                if (data[i].truckNo === data[i - 1].truckNo) {
+                  this.spanArr[this.pos] += 1;
+                  this.spanArr.push(0);
+                } else {
+                  this.spanArr.push(1);
+                  this.pos = i;
+                }
+            }
+        }
+    },
+    //根据条件合并行
+    cellMerge({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 1) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 7) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 8) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 9) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 10) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 11) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+      if (columnIndex === 12) {
+            const _row = this.spanArr[rowIndex];
+            const _col = _row > 0 ? 1 : 0;
+            return {
+                  rowspan: _row,
+                  colspan: _col
+            }
+      }
+    },
+  },
+};
+</script>
+
+<style lang='scss'>
+.addSaleOrderSend {
+  .from {
+    margin-top: 20px;
+    .line {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 350px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+    }
+    .sendCar {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .el-input {
+        width: 70px;
+        margin-left: 10px;
+        margin-right: 10px;
+        margin-top: 10px;
+      }
+    }
+    .vehicle {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin-top: 20px;
+      .el-button {
+        width: 250px;
+        margin-left: 10px;
+        margin-right: 10px;
+      }
+      .span {
+        width: 70px;
+      }
+    }
+  }
+  .tablecls{
+    margin-top: 20px;
+  }
+  .button_box{
+    display: flex;
+    justify-content: center;
+    margin: 20px;
+    .el-button{
+      width: 100px;
+      margin-left: 20px;
+    }
+  }
+}
+</style>

+ 12 - 0
src/views/appoint/router/index.js

@@ -36,6 +36,8 @@ import addSaleOrderArrange from '../components/saleContract/addSaleOrderArrange.
 import addSaleOrderSend from '../components/saleContract/addSaleOrderSend.vue'
 import addSaleOrderSend from '../components/saleContract/addSaleOrderSend.vue'
 import addSaleOrderCoproductSend from '../components/saleContract/addSaleOrderCoproductSend.vue'
 import addSaleOrderCoproductSend from '../components/saleContract/addSaleOrderCoproductSend.vue'
 import addSaleOrderCoproductSendCarrier from '../components/saleContract/addSaleOrderCoproductSendCarrier.vue'
 import addSaleOrderCoproductSendCarrier from '../components/saleContract/addSaleOrderCoproductSendCarrier.vue'
+import addSaleOrderSteelSend from '../components/saleContract/addSaleOrderSteelSend.vue'
+import addSaleOrderSteelSendCarrier from '../components/saleContract/addSaleOrderSteelSendCarrier.vue'
 import addSalePlan from '../components/saleContract/addSalePlan.vue'
 import addSalePlan from '../components/saleContract/addSalePlan.vue'
 import addSalePlanDetail from '../components/saleContract/addSalePlanDetail.vue'
 import addSalePlanDetail from '../components/saleContract/addSalePlanDetail.vue'
 import addTransportPrice from '../components/saleContract/addTransportPrice.vue'
 import addTransportPrice from '../components/saleContract/addTransportPrice.vue'
@@ -55,6 +57,10 @@ import saleOrderCoproductCarrier from '../components/saleContract/saleOrderCopro
 import saleOrderDetail from '../components/saleContract/saleOrderDetail.vue'
 import saleOrderDetail from '../components/saleContract/saleOrderDetail.vue'
 import saleOrderDetailApproved from '../components/saleContract/saleOrderDetailApproved.vue'
 import saleOrderDetailApproved from '../components/saleContract/saleOrderDetailApproved.vue'
 import saleOrderMaterial from '../components/saleContract/saleOrderMaterial.vue'
 import saleOrderMaterial from '../components/saleContract/saleOrderMaterial.vue'
+import saleOrderSteel from '../components/saleContract/saleOrderSteel.vue'
+import saleOrderSteelCar from '../components/saleContract/saleOrderSteelCar.vue'
+import saleOrderSteelCarrier from '../components/saleContract/saleOrderSteelCarrier.vue'
+import saleOrderSteelEmpower from '../components/saleContract/saleOrderSteelEmpower.vue'
 import saleOrderUpdateLog from '../components/saleContract/saleOrderUpdateLog.vue'
 import saleOrderUpdateLog from '../components/saleContract/saleOrderUpdateLog.vue'
 import salePlan from '../components/saleContract/salePlan.vue'
 import salePlan from '../components/saleContract/salePlan.vue'
 import transportPrice from '../components/saleContract/transportPrice.vue'
 import transportPrice from '../components/saleContract/transportPrice.vue'
@@ -102,6 +108,8 @@ const constantRouterMap = [
       {path: 'addSaleOrderCoproductSend/:saleOrderId', name: 'addSaleOrderCoproductSend', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderCoproductSend},
       {path: 'addSaleOrderCoproductSend/:saleOrderId', name: 'addSaleOrderCoproductSend', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderCoproductSend},
       {path: 'addSaleOrderCoproductSendCarrier/:saleOrderId', name: 'addSaleOrderCoproductSendCarrier', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderCoproductSendCarrier},
       {path: 'addSaleOrderCoproductSendCarrier/:saleOrderId', name: 'addSaleOrderCoproductSendCarrier', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderCoproductSendCarrier},
       {path: 'addSaleOrderSend/:saleOrderId', name: 'addSaleOrderSend', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderSend},
       {path: 'addSaleOrderSend/:saleOrderId', name: 'addSaleOrderSend', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderSend},
+      {path: 'addSaleOrderSteelSend/:saleOrderMaterialId', name: 'addSaleOrderSteelSend', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderSteelSend},
+      {path: 'addSaleOrderSteelSendCarrier/:saleOrderId', name: 'addSaleOrderSteelSendCarrier', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrderSteelSendCarrier},
       {path: 'addSalePlan', name: 'addSalePlan', meta: {code: 'xtpzgl-yhgl'}, component: addSalePlan},
       {path: 'addSalePlan', name: 'addSalePlan', meta: {code: 'xtpzgl-yhgl'}, component: addSalePlan},
       {path: 'addSalePlanDetail/:planId', name: 'addSalePlanDetail', meta: {code: 'xtpzgl-yhgl'}, component: addSalePlanDetail},
       {path: 'addSalePlanDetail/:planId', name: 'addSalePlanDetail', meta: {code: 'xtpzgl-yhgl'}, component: addSalePlanDetail},
       {path: 'saleOrderMaterial/:saleOrderId', name: 'saleOrderMaterial', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderMaterial},
       {path: 'saleOrderMaterial/:saleOrderId', name: 'saleOrderMaterial', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderMaterial},
@@ -119,6 +127,10 @@ const constantRouterMap = [
       {path: 'saleOrderArrange', name: 'saleOrderArrange', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderArrange},
       {path: 'saleOrderArrange', name: 'saleOrderArrange', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderArrange},
       {path: 'saleOrderCoproduct', name: 'saleOrderCoproduct', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderCoproduct},
       {path: 'saleOrderCoproduct', name: 'saleOrderCoproduct', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderCoproduct},
       {path: 'saleOrderCoproductCarrier', name: 'saleOrderCoproductCarrier', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderCoproductCarrier},
       {path: 'saleOrderCoproductCarrier', name: 'saleOrderCoproductCarrier', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderCoproductCarrier},
+      {path: 'saleOrderSteel', name: 'saleOrderSteel', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderSteel},
+      {path: 'saleOrderSteelCar', name: 'saleOrderSteelCar', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderSteelCar},
+      {path: 'saleOrderSteelCarrier', name: 'saleOrderSteelCarrier', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderSteelCarrier},
+      {path: 'saleOrderSteelEmpower/:saleOrderMaterialId', name: 'saleOrderSteelEmpower', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderSteelEmpower},
       {path: 'saleOrderDetail/:saleOrderId', name: 'saleOrderDetail', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderDetail},
       {path: 'saleOrderDetail/:saleOrderId', name: 'saleOrderDetail', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderDetail},
       {path: 'saleOrderDetailApproved/:saleOrderId', name: 'saleOrderDetailApproved', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderDetailApproved},
       {path: 'saleOrderDetailApproved/:saleOrderId', name: 'saleOrderDetailApproved', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderDetailApproved},
       {path: 'saleOrderUpdateLog/:saleOrderId', name: 'saleOrderUpdateLog', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderUpdateLog},
       {path: 'saleOrderUpdateLog/:saleOrderId', name: 'saleOrderUpdateLog', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderUpdateLog},

+ 57 - 11
src/views/inward/components/inwardSettlement/detailOrder.vue

@@ -2,7 +2,20 @@
 <template>
 <template>
   <div class="steel_inbound">
   <div class="steel_inbound">
     <div class="sache">
     <div class="sache">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <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">
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
         <i class="el-icon-search"></i>查询
       </el-button>
       </el-button>
@@ -33,9 +46,12 @@
 
 
 <script>
 <script>
 import { getCookie } from "@/utils/util.js";
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from '@/utils/sharedJsFile';
 export default {
 export default {
   data(){
   data(){
     return{
     return{
+      startTime: null,
+      endTime: null,
       //合计净重
       //合计净重
       totalNetWeight:null,
       totalNetWeight:null,
       //合计金额
       //合计金额
@@ -90,41 +106,71 @@ export default {
   methods:{
   methods:{
     func(res){
     func(res){
       console.log(res.list)
       console.log(res.list)
+      var totalWeight = 0;
+      var totalAllMoney = 0;
       res.list.forEach(e => {
       res.list.forEach(e => {
         console.log(e.resultNetWeight)
         console.log(e.resultNetWeight)
-        this.totalNetWeight = this.totalNetWeight + e.resultNetWeight
-        this.totalMoney = this.totalMoney + e.detailsAmount
+        totalWeight = totalWeight + e.resultNetWeight
+        totalAllMoney = totalAllMoney + e.detailsAmount
         console.log(e.detailsAmount);
         console.log(e.detailsAmount);
       });
       });
+      this.totalNetWeight = totalWeight.toFixed(2) + 't';
+      this.totalMoney = totalAllMoney.toFixed(2) + '元'
     },
     },
     //未结算数据
     //未结算数据
     options1GetRequestUrl(){
     options1GetRequestUrl(){
     if(getCookie("orgCode") == "chengyunshang"){
     if(getCookie("orgCode") == "chengyunshang"){
       this.ssoId=getCookie('userId');
       this.ssoId=getCookie('userId');
-      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&carrierSsoId="+ getCookie('userId');
+      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&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"){
     }else if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
-      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0"
+      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&startTime=null&endTime=null&i=" +new Date();
     }else{
     }else{
-      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&userId=" + getCookie("orgCode");  
+      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&userId=" + getCookie("orgCode") + "&startTime=null&endTime=null&i=" +new Date(); 
     }
     }
     },
     },
     //已结算数据
     //已结算数据
     options2GetRequestUrl(){
     options2GetRequestUrl(){
      if(getCookie("orgCode") == "chengyunshang"){
      if(getCookie("orgCode") == "chengyunshang"){
       this.ssoId=getCookie('userId');
       this.ssoId=getCookie('userId');
-      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&carrierSsoId="+ getCookie('userId');
+      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&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"){
     }else if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
-      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1"
+      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" + "&startTime=null&endTime=null&i=" +new Date();
     }else{
     }else{
-      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&userId=" + getCookie("orgCode");  
+      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&userId=" + getCookie("orgCode") + "&startTime=null&endTime=null&i=" +new Date();
     }
     }
     },
     },
      toInsert() {
      toInsert() {
       this.$router.push("/insertCheckInventory");
       this.$router.push("/insertCheckInventory");
     },
     },
     onclick(){
     onclick(){
-      console.log("查询待定值")
-      // this.options.requestUrl = "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=1&con="+this.input;
+      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/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0" + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+          this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+          }else if(getCookie("orgCode") == "chengyunshang"){
+          this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&carrierSsoId="+ getCookie('userId') + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+          this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&carrierSsoId="+ getCookie('userId') + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+          }else{
+            this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&userId=" + getCookie("orgCode") + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+            this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&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(){
     select(){

+ 51 - 7
src/views/inward/components/inwardSettlement/purInwardDetailsOrder.vue

@@ -2,7 +2,20 @@
 <template>
 <template>
   <div class="steel_inbound">
   <div class="steel_inbound">
     <div class="sache">
     <div class="sache">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <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">
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
         <i class="el-icon-search"></i>查询
       </el-button>
       </el-button>
@@ -31,9 +44,12 @@
 
 
 <script>
 <script>
 import { getCookie } from "@/utils/util.js";
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from '@/utils/sharedJsFile';
 export default {
 export default {
   data(){
   data(){
     return{
     return{
+      startTime: null,
+      endTime: null,
       totalNetWeight:null,
       totalNetWeight:null,
       totalMoney:null,
       totalMoney:null,
       //单价
       //单价
@@ -85,12 +101,14 @@ export default {
   methods:{
   methods:{
     func(res){
     func(res){
       console.log(res.list);
       console.log(res.list);
+      var totalWeight = 0;
+      var totalAllMoney = 0;
       res.list.forEach(e => {
       res.list.forEach(e => {
-        console.log(e.netWeightSecond)
-        this.totalNetWeight = this.totalNetWeight + e.netWeightSecond
-        this.totalMoney = this.totalMoney + e.secondAmount
-        console.log(e.secondAmount);
+        totalWeight = totalWeight + e.netWeightSecond
+        totalAllMoney = totalAllMoney + e.secondAmount
       });
       });
+      this.totalNetWeight = totalWeight.toFixed(2) + 't';
+      this.totalMoney = totalAllMoney.toFixed(2) + '元'
     },
     },
     //未结算数据
     //未结算数据
     options1GetRequestUrl(){
     options1GetRequestUrl(){
@@ -119,8 +137,34 @@ export default {
     },
     },
 
 
     onclick(){
     onclick(){
-      console.log("查询待定值")
-      // this.options.requestUrl = "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=1&con="+this.input;
+      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/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0" + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+          this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1" + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+          }else if(getCookie("orgCode") == "chengyunshang"){
+          this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0&carrierSsoId="+ getCookie('userId') + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+          this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1&carrierSsoId="+ getCookie('userId') + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+          }else{
+            this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0&userId=" + getCookie("orgCode") + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+            this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1&userId=" + getCookie("orgCode") + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+          }
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+
+      }
     },
     },
     //运输订单点击浏览的事件
     //运输订单点击浏览的事件
     select(){
     select(){

+ 52 - 6
src/views/inward/components/inwardSettlement/timeDetailsWeight.vue

@@ -2,7 +2,20 @@
 <template>
 <template>
   <div class="steel_inbound">
   <div class="steel_inbound">
     <div class="sache">
     <div class="sache">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <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">
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
         <i class="el-icon-search"></i>查询
       </el-button>
       </el-button>
@@ -31,10 +44,13 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { getCookie } from "@/utils/util.js";
+import { sjTime } from '@/utils/sharedJsFile';
+import { getCookie } from '@/utils/util.js';
 export default {
 export default {
   data(){
   data(){
     return{
     return{
+      startTime: null,
+      endTime: null,
       totalMoney:null,
       totalMoney:null,
       totalTime:null,
       totalTime:null,
       //单价
       //单价
@@ -112,14 +128,44 @@ export default {
     },
     },
     func(res){
     func(res){
       console.log(res);
       console.log(res);
+      var totalAllTime = 0;
+      var totalAllMoney = 0;
       res.list.forEach(e => {
       res.list.forEach(e => {
-        this.totalTime = this.totalTime + e.resultTime
-        this.totalMoney = this.totalMoney + e.detailsAmount
+        totalAllTime = totalAllTime + e.resultTime
+        totalAllMoney = totalAllMoney + e.detailsAmount
       });
       });
+      this.totalMoney = totalAllMoney;
+      this.totalTime = totalAllTime;      
     },
     },
     onclick(){
     onclick(){
-      console.log("查询待定值")
-      // this.options.requestUrl = "/api/v1/bms/getTruckDetailsOrderList?apiId=176&orderType=1&con="+this.input;
+      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/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0" + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+          this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1" + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+          }else if(getCookie("orgCode") == "chengyunshang"){
+          this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0&carrierSsoId="+ getCookie('userId') + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+          this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1&carrierSsoId="+ getCookie('userId') + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+          }else{
+            this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0&userId=" + getCookie("orgCode") + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+            this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1&userId=" + getCookie("orgCode") + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+          }
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+
+      }
     },
     },
     //运输订单点击浏览的事件
     //运输订单点击浏览的事件
     select(){
     select(){

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

@@ -110,6 +110,7 @@ export default {
       disabled:false,
       disabled:false,
       //船名
       //船名
       remark: null,
       remark: null,
+      rangeId:null,
       //车辆表格数据
       //车辆表格数据
       selectionList: [],
       selectionList: [],
       stateCarrier:null,
       stateCarrier:null,
@@ -192,10 +193,10 @@ export default {
       console.log(this.purchaseOrgId)
       console.log(this.purchaseOrgId)
       if(this.purchaseOrgId == 1) {
       if(this.purchaseOrgId == 1) {
         this.purchaseOrgLable = "一厂"
         this.purchaseOrgLable = "一厂"
-        console.log(this.purchaseOrgLable)
+        this.rangeId = 2
       }else{
       }else{
         this.purchaseOrgLable = "二厂"
         this.purchaseOrgLable = "二厂"
-        console.log(this.purchaseOrgLable)
+        this.rangeId = 3
       }  
       }  
     },
     },
     getPurchaseOrderNo() {
     getPurchaseOrderNo() {
@@ -347,6 +348,7 @@ export default {
           purchaseOrderId: this.purchaseOrderId,
           purchaseOrderId: this.purchaseOrderId,
           unloadPointId: this.unloadPointId,
           unloadPointId: this.unloadPointId,
           carrierId:this.carrierId,
           carrierId:this.carrierId,
+          rangeId:this.rangeId,
           userId:getCookie("orgCode")
           userId:getCookie("orgCode")
         };
         };
         console.log(map, map);
         console.log(map, map);

+ 3 - 0
src/views/inward/components/truckAppoint/addRequirement2.vue

@@ -804,6 +804,9 @@ export default {
     width: 320px;
     width: 320px;
   }
   }
 }
 }
+.preview-group {
+    width: 700px;
+}
 .swtichTop{
 .swtichTop{
   display: flex;
   display: flex;
   height: 40px;
   height: 40px;

+ 1 - 1
src/views/inward/components/truckAppoint/requirementOther.vue

@@ -198,7 +198,7 @@ export default {
         this.$message.warning("请选择需求")
         this.$message.warning("请选择需求")
         return
         return
       }
       }
-      // 权限控制,判断用户是否属于炼铁厂下面的车间
+  	// 权限控制,判断用户是否属于炼铁厂下面的车间
       for(let i=0;i<this.first.mapList.length;i++){
       for(let i=0;i<this.first.mapList.length;i++){
         if((this.first.mapList[i].requirementType=="计时")&&(getCookie("orgCode")=="liantiechang-yuanliaochejian"||getCookie("orgCode")=="liantiechang-shaojiechejian"||getCookie("orgCode")=="liantiechang-dagaoluchejian"||getCookie("orgCode")=="liantiechang-xiaogaoluchejian"||getCookie("orgCode")=="liantiechang-rongjichejian"||getCookie("orgCode")=="liantiechang-weijianchejian")){
         if((this.first.mapList[i].requirementType=="计时")&&(getCookie("orgCode")=="liantiechang-yuanliaochejian"||getCookie("orgCode")=="liantiechang-shaojiechejian"||getCookie("orgCode")=="liantiechang-dagaoluchejian"||getCookie("orgCode")=="liantiechang-xiaogaoluchejian"||getCookie("orgCode")=="liantiechang-rongjichejian"||getCookie("orgCode")=="liantiechang-weijianchejian")){
           this.$message.warning("请选择联系炼铁厂相关负责人完成计时作业下发")
           this.$message.warning("请选择联系炼铁厂相关负责人完成计时作业下发")

+ 9 - 1
src/views/inward/components/truckOrder/dispatchPlan.vue

@@ -75,7 +75,15 @@
             </dilTable>
             </dilTable>
           </el-tab-pane>
           </el-tab-pane>
           <el-tab-pane label="已接收" name="second">
           <el-tab-pane label="已接收" name="second">
-            <dilTable v-bind.sync="second"> </dilTable>
+            <dilTable v-bind.sync="second"> 
+              <el-table-column fixed="right" label="操作" width="80">
+                <template slot-scope="scope">
+                  <el-button type="text" size="mini" @click="deleteClick(scope)">
+                    关闭
+                  </el-button>
+                </template>
+              </el-table-column>
+            </dilTable>
           </el-tab-pane>
           </el-tab-pane>
         </el-tabs>
         </el-tabs>
       </div>
       </div>

+ 61 - 0
src/views/sale/app.js

@@ -15,6 +15,67 @@ import VueApollo from 'vue-apollo'
 
 
 import apollo from '@/config/apolloConfig.js'
 import apollo from '@/config/apolloConfig.js'
 
 
+import Print from 'vue-print-nb';
+Vue.use(Print);
+
+
+import 'xe-utils' 
+import VXETable from 'vxe-table'
+import 'vxe-table/lib/style.css'
+Vue.use(VXETable)
+Vue.prototype.$XModal = VXETable.modal
+
+
+import AMap from 'vue-amap';
+
+Vue.use(AMap);
+  AMap.initAMapApiLoader({
+    key: 'eed46ea40bbcadbf8a9cdd5dc1a94642',
+    plugin: [
+      "AMap.Autocomplete", // 输入提示插件
+      "AMap.PlaceSearch", // POI搜索插件
+      "AMap.Scale", // 右下角缩略图插件 比例尺
+      "AMap.OverView", // 地图鹰眼插件
+      "AMap.ToolBar", // 地图工具条
+      "AMap.MapType", // 类别切换控件,实现默认图层与卫星图、实施交通图层之间切换的控制
+      "AMap.PolyEditor", // 编辑 折线多,边形
+      "AMap.CircleEditor", // 圆形编辑器插件
+      "AMap.Geolocation", // 定位控件,用来获取和展示用户主机所在的经纬度位置
+      "AMap.ControlBar"   // 缩放、尺寸控制器
+    ],
+    // 默认高德 sdk 版本为 1.4.4
+    v: '1.4.15',
+    uiVersion: '1.1.1'
+});
+
+import Share from 'vue-social-share'
+Vue.use(Share);
+
+import 'view-design/dist/styles/iview.css';
+import ViewUI from 'view-design';
+Vue.use(ViewUI);
+// import VueAMap from 'vue-amap'
+ 
+// Vue.use(VueAMap)
+ 
+// VueAMap.initAMapApiLoader({
+//   key: 'eed46ea40bbcadbf8a9cdd5dc1a94642',
+//   plugin: [//高德地图扩展插件(按需添加)
+//     'AMap.Autocomplete', // 输入提示插件
+//     'AMap.PlaceSearch', // POI搜索插件
+//     'AMap.Scale', // 右下角缩略图插件 比例尺
+//     'AMap.OverView', // 地图鹰眼插件
+//     'AMap.ToolBar', // 地图工具条
+//     'AMap.MapType', // 类别切换控件,实现默认图层与卫星图、实施交通图层之间切换的控制
+//     'AMap.PolyEditor', // 编辑 折线多,边形
+//     'AMap.CircleEditor', // 圆形编辑器插件
+//     'AMap.Geolocation' // 定位控件,用来获取和展示用户主机所在的经纬度位置
+//   ],
+  // uiVersion: '1.1', // ui库版本,不配置不加载,
+  // v: '2.0'
+// })
+
+
 // 关闭生产模式下给出的提示
 // 关闭生产模式下给出的提示
 Vue.config.productionTip = false;
 Vue.config.productionTip = false;
 
 

+ 409 - 0
src/views/sale/components/offSiteTransportation/inTransit.vue

@@ -0,0 +1,409 @@
+<template>
+  <!-- 在途运输信息选择页面 -->
+  <div class="inTransit">
+
+    <el-form :inline="true">
+  <el-form-item>
+    <label class="el-form-item__label" style="width: auto;">时间段</label>
+         <el-date-picker
+      v-model="dateValue"
+      type="daterange"
+      range-separator="至"
+      start-placeholder="开始日期"
+      end-placeholder="结束日期">
+    </el-date-picker>
+  </el-form-item>
+  <el-form-item>
+     <label class="el-form-item__label" style="width: auto;">产品分类</label>
+      <el-input v-model="inputValue" placeholder="请输入内容"></el-input>
+  </el-form-item>
+  <el-form-item>
+      <label class="el-form-item__label" style="width: auto;">车牌号</label>
+      <el-input v-model="capacityNumber1" placeholder="请输入内容"></el-input>
+  </el-form-item>
+  <el-form-item>
+      <label class="el-form-item__label" style="width: auto;">收货单位</label>
+      <el-input v-model="consigneeCompanyName1" placeholder="请输入内容"></el-input>
+  </el-form-item> 
+  <el-form-item>
+      <label class="el-form-item__label" style="width: auto;">承运单位</label>
+      <el-input v-model="carrierName" placeholder="请输入内容"></el-input>
+  </el-form-item> 
+   <el-form-item>
+     <label class="el-form-item__label" style="width: auto;">门岗名称</label>
+     <el-input v-model="gatepostName" placeholder="请输入内容"></el-input>
+  </el-form-item> 
+  <el-form-item>
+    <label class="el-form-item__label" style="width: auto;">报警类型</label>
+      <el-select v-model="exceptionType" placeholder="报警类型">
+        <el-option
+          v-for="item in exceptionTypes"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value">
+        </el-option>
+      </el-select>
+      <!-- <label class="el-form-item__label" style="width: auto;">报警类型</label>
+       <el-autocomplete
+            popper-class="my-autocomplete"
+            v-model="exceptionType"
+            :fetch-suggestions="querySearch3"
+            placeholder="请输入内容" 
+          >
+            <i class="el-icon-edit el-input__icon" slot="suffix"> </i>
+          </el-autocomplete> -->
+  </el-form-item> 
+  <el-form-item>
+    <el-button type="primary" @click="onSearch"><i class="el-icon-search"></i>查询</el-button>
+    <el-button type="primary" @click="exportData">导出</el-button>
+  </el-form-item>
+</el-form>
+  
+    <!-- 执行中 -->
+<el-tabs v-model="activeName" >
+    <el-tab-pane label="执行中" name="first">
+    <dilTable ref="tab" v-bind.sync="option">
+      <el-table-column fixed="right" label="操作" width="110">
+        <template slot-scope="scope">
+          <el-button @click="click(scope.row)" type="text" size="small" style="font-size: 17px"
+            >实时轨迹</el-button
+          >
+        </template>
+      </el-table-column>
+    </dilTable>
+    </el-tab-pane>
+    <!-- 已结束 -->
+      <el-tab-pane label="已结束" name="second">
+        <dilTable ref="tab2" v-bind.sync="option2">
+         <el-table-column fixed="right" label="操作" width="220">
+        <template slot-scope="scope">
+          <el-button @click="historyclick(scope.row)" type="text" size="small" style="font-size: 17px">历史轨迹</el-button>
+          <el-button @click="allDistanceclick(scope.row.orderNumber)" type="text" size="small" style="font-size: 17px">总距离</el-button>
+        </template>
+      </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+      <!-- 有异常 -->
+      <el-tab-pane label="有异常" name="third">
+        <dilTable ref="tab3" v-bind.sync="option3">
+         <el-table-column fixed="right" label="操作" width="220">
+        <template slot-scope="scope">
+           <el-button @click="click(scope.row)" type="text" size="small" style="font-size: 17px"
+            >实时轨迹</el-button
+          >
+          <el-button @click="inTransitAlarmclick(scope.row.orderNumber)" type="text" size="small" style="font-size: 17px">运输报警</el-button>
+        </template>
+      </el-table-column>
+        </dilTable>
+      </el-tab-pane>
+    </el-tabs>
+    <div style="height: 100%">
+      <vxe-modal width="1237" height="731" v-model="value7" show-zoom resize>
+            <template #default>
+              
+              <PathView v-bind.sync="pathOption"></PathView>
+            </template>
+      </vxe-modal>
+    </div>
+    <!-- <div style="height: 100%">
+      <vxe-modal width="1237" height="731" v-model="value6" show-zoom resize>
+            <template #default>
+              
+              <inTransitOrderMileage v-bind.sync="mileOption"></inTransitOrderMileage>
+            </template>
+          </vxe-modal>
+    </div>
+     <div style="height: 100%">
+      <vxe-modal width="1237" height="731" v-model="value5" show-zoom resize>
+            <template #default>
+              
+              <inTransitAlarm v-bind.sync="alarmOption"></inTransitAlarm>
+            </template>
+          </vxe-modal>
+    </div> -->
+         
+  </div>
+</template>
+
+
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+
+//PathView组件注册
+// import PageTitle from "@/offSiteTransportation/mapTest.vue";
+import PathView from "./mapTest.vue"
+// import InTransitOrderMileage from "@/views/TMS/tms-offsite/inTransitOrderMileage.vue"
+// import inTransitAlarm from "@/views/TMS/tms-offsite/inTransitAlarm.vue"
+export default {
+  name: "inTransit",
+    components: { 
+      PathView,
+      // InTransitOrderMileage,
+      // inTransitAlarm
+  },
+  data() {
+    return {
+      
+      exceptionTypes:[{
+          value: '全部类型',
+          label: '全部类型'
+        }, {
+          value: '离线',
+          label: '离线'
+        },{
+          value: '停车',
+          label: '停车'
+        },{
+          value: '偏离',
+          label: '偏离'
+        }],
+        inputValues:[{
+          value: '螺纹钢',
+          label: '螺纹钢'
+        }, {
+          value: '微粉',
+          label: '微粉'
+        },{
+          value: '带钢',
+          label: '带钢'
+        },{
+          value: '钢坯',
+          label: '钢坯'
+        },{
+          value: '其他',
+          label: '其他'
+        }],
+       gatepostNames1: [{
+          value: '信钢北门出口',
+          label: '信钢北门出口'
+        }, {
+          value: '科创微粉出口',
+          label: '科创微粉出口'
+        },{
+          value: '象屿库',
+          label: '象屿库'
+        },{
+          value: '智同库',
+          label: '智同库'
+        },{
+          value: '中联厂出口',      
+          label: '中联厂出口'
+        }],
+      dateValue:[new Date(), new Date()],
+      inputValue:"螺纹钢",
+      exceptionType:"全部类型",
+      selectOrderNumber:"",
+      capacityNumber1:"",
+      carrierName:"",
+       gatepostName:"",
+       value7:false,
+       value6:false,
+       value5:false,
+       dialogVisible:false,
+      consigneeCompanyName1:"",
+      status: "",
+      state: "",
+      activeName: "first",
+      option: {       
+        // 表格请求数据的地址
+        requestUrl: "/api/v1/otms/getInTransitTransportation?apiId=468",
+      },
+       option2: {
+        // 表格请求数据的地址
+        requestUrl: "/api/v1/otms/getFinishTruckOrderInfo?apiId=468",
+      },
+      pathOption:{
+           orderNumber:'',
+        capacityNumber:'',
+         startPointName:'',
+        endPointName:'',
+      },
+      mileOption:{
+        orderNumber:''
+      },
+      alarmOption:{
+        orderNumber:''
+      },
+       option3: {
+        // 表格请求数据的地址
+        // requestUrl: "/api/v1/tms/getHaveAbnormalTruckOrderInfo?apiId=160",
+      }
+    };
+  },
+  mounted() {
+    console.log("nijfdsojfosafj")
+    this.restaurants = this.loadAll();
+    // this.onSearch();
+    
+  },
+  methods: {
+    showPathView(data){
+      this.dialogVisible=!this.dialogVisible;
+      this.selectOrderNumber=data.orderNumber;
+    },
+    querySearch(queryString, cb) {
+      var restaurants = this.restaurants;
+      var results = queryString
+        ? restaurants.filter(this.createFilter(queryString))
+        : restaurants;
+      cb(results);
+    },
+     querySearch2(queryString, cb) {
+      var restaurants = [
+        { value: "信钢北门出口"},
+        { value: "科创微粉出口"},
+        { value: "象屿库"},
+        { value: "智同库"},
+      ];
+      var results = queryString
+        ? restaurants.filter(this.createFilter(queryString))
+        : restaurants;
+      cb(results);
+    },
+     querySearch3(queryString, cb) {
+      var restaurants = [
+        { value: "离线"},
+        { value: "停车"},
+        { value: "偏离"},
+        { value: "全部类型"},
+      ];
+      var results = queryString
+        ? restaurants.filter(this.createFilter(queryString))
+        : restaurants;
+      cb(results);
+    },
+    createFilter(queryString) {
+      return (restaurant) => {
+        return (
+          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
+          0
+        );
+      };
+    },
+    loadAll() {
+      return [
+        { value: "螺纹钢"},
+         { value: "微粉"},
+        { value: "带钢"},
+        { value: "钢坯"},
+        { value: "其他"},
+      ];
+    },
+    exportData(){
+        
+
+        let tHeader = [];
+        let filterVal = [];
+        if(this.activeName=="first"){
+          this.$refs.tab.dataColumnData.filter( (item,i) =>{
+                    tHeader.push(item.label);
+                        filterVal.push(item.prop);
+                    } )
+            this.export2Excel(tHeader,filterVal,this.$refs.tab.dataTabel,'执行中表格');
+        }else if(this.activeName=="second"){
+            this.$refs.tab2.dataColumnData.filter( (item,i) =>{
+              tHeader.push(item.label);
+                  filterVal.push(item.prop);
+              } )
+          this.export2Excel(tHeader,filterVal,this.$refs.tab2.dataTabel,'已完成表格');
+        } else if(this.activeName=="third"){
+            this.$refs.tab3.dataColumnData.filter( (item,i) =>{
+                      tHeader.push(item.label);
+                          filterVal.push(item.prop);
+                      } )
+            this.export2Excel(tHeader,filterVal,this.$refs.tab3.dataTabel,'有异常表格');
+        }
+        
+        
+    },
+    export2Excel(tHeader,filterVal,dataTabel,exeName) {
+      var that = this;
+       this.downloadLoading = true
+      require.ensure([], () => {
+        const { export_json_to_excel } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        console.log("export_json_to_excel",export_json_to_excel)
+        let list = dataTabel;
+        let data = that.formatJson(filterVal, list);
+        export_json_to_excel(tHeader, data, exeName); // 导出的表格名称
+      });
+    },
+    //3.格式转换
+    formatJson(filterVal, jsonData) {
+      return jsonData.map((v) => filterVal.map((j) => v[j]));
+    },
+    onSearch(){
+  
+      if(this.activeName=="first"){
+      //改变执行中条件
+      this.$refs.tab.setDataRequestQuery({"startTime":sjTime(this.dateValue[0]),
+                      "endTime": sjTime(this.dateValue[1]),
+                      "materialNames": this.inputValue,
+                      "capacityNumbers": this.capacityNumber1,
+                      "carrierNames":this.carrierName,
+                      "outGatepostNames":this.gatepostName,
+                      "consigneeCompanyNames": this.consigneeCompanyName1});
+      }
+      if(this.activeName=="second"){
+      //改变已完成条件              
+      this.$refs.tab2.setDataRequestQuery({"startTime":sjTime(this.dateValue[0]),
+                      "endTime": sjTime(this.dateValue[1]),
+                      "materialNames": this.inputValue,
+                      "capacityNumbers": this.capacityNumber1,
+                      "carrierNames":this.carrierName,
+                      "outGatepostNames":this.gatepostName,
+                      "consigneeCompanyNames": this.consigneeCompanyName1});
+      }
+      if(this.activeName=="third"){
+      //改变有异常条件              
+      this.$refs.tab3.setDataRequestQuery({"startTime":sjTime(this.dateValue[0]),
+                      "endTime": sjTime(this.dateValue[1]),
+                      "materialNames": this.inputValue,
+                      "capacityNumber1": this.capacityNumber1,
+                      "carrierName1":this.carrierName,
+                      "abnormalType":this.exceptionType=="全部类型"?"":this.exceptionType,
+                      "outGatepostNames":this.gatepostName,
+                      "consigneeCompanyName1": this.consigneeCompanyName1});
+      }                              
+    },
+
+
+    //other
+    click(row) {
+     
+        this.pathOption.orderNumber=row.orderNumber;
+        this.pathOption.capacityNumber=row.capacityNumber;
+        this.pathOption.startPointName="达钢集团"+row.outGatepostName,
+        this.pathOption.endPointName=row.deliveryAddress,
+         console.log(this.pathOption,"this.pathOption")
+        this.value7=true;
+      // this.$router.push("/offsite/pathView?orderNumber="+row.orderNumber+"&capacityNumber="+row.capacityNumber);
+    },
+    historyclick(row){
+      
+      this.pathOption.orderNumber=row.orderNumber;
+        this.pathOption.capacityNumber=row.capacityNumber;
+        
+        this.value7=true;
+      //this.$router.push("/offsite/pathView?orderNumber="+row.orderNumber+"&capacityNumber="+row.capacityNumber);
+    },
+    allDistanceclick(orderNumber){
+      //this.$router.push("/offsite/inTransitOrderMileage?orderNumber="+orderNumber);
+    
+      this.mileOption.orderNumber=orderNumber;
+      this.value6=true;
+    },
+    inTransitAlarmclick(orderNumber){
+      // this.$router.push("/offsite/inTransitAlarm?orderNumber="+orderNumber);
+      this.alarmOption.orderNumber=orderNumber;
+      this.value5=true;
+    },
+    },
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 20px 30px;
+  }
+}
+</style>

+ 497 - 0
src/views/sale/components/offSiteTransportation/mapTest.vue

@@ -0,0 +1,497 @@
+<template>
+    <div class="container">
+        <div id="amap-container"></div>
+         <div class="controller">
+             <div class="in_transit_information">
+                 <label class="item_details">起点:{{startPointName}}</label>
+                 <br/>
+                 <label class="item_details">终点:{{endPointName}}</label>
+                 <br/>
+             </div>
+             <div class="driving_information">  
+                <label class="item_details">时间:{{runRoute.gtm}}</label>
+                <br/>
+                <label class="item_details">车速:{{runRoute.spd}}千米/小时</label>
+                <br/>
+                <!-- <label class="item_details">当前位置:{{transportDetail.currentPointName}}</label>
+                <br/> -->
+                <!--控制条-->
+                <div class="map-control" v-show="isActual">
+                    <!--播放暂停按钮-->
+                    <Icon v-if="!isPlay" class="play-icon play"  type="ios-play" @click="isPlay=true;play();navgControl(playIcon)"/>
+                    <Icon v-else class="play-icon pause" type="ios-pause" @click="isPlay=false;stop();navgControl('pause')"/>
+                    <Icon class="play-icon quickly"  type="ios-play" @click="addIndex()"/>
+                    <!--已播放时间-->
+                    <!-- <span class="passed-time">{{passedTime}}</span> -->
+                    <!--进度条-->
+                    <div class="mySlider"><Slider class="map-slider" v-model="sliderVal" :tip-format="hideFormat" :step="0.0001"></Slider></div>
+                    <!--倍速-->
+                    <!-- <div class="map-times" @mouseenter="isTimesChoose=true" @mouseleave="isTimesChoose=false">
+                        <div class="times-show">倍速 {{times}}</div>
+                        <div class="choose-box">
+                        <ul >
+                            <li v-for="item in speedList" :key="item.value" :class="{active:times==item.value}" @click="changeSpeed(item.value)">{{item.label}}</li>
+                        </ul>
+                        </div>
+                    </div> -->
+                    <!--结束时间-->
+                    <!-- <span class="end-time">{{totalTime}}</span> -->
+                </div>
+             </div>
+         </div>
+    
+    </div>
+</template>
+
+<script>
+import AMapLoader from '@amap/amap-jsapi-loader';
+import { shallowRef } from '@vue/reactivity'
+import { Loading } from 'element-ui';
+import { lazyAMapApiLoaderInstance } from 'vue-amap';
+import Slider from './slider.vue'
+Vue.use(Slider)
+import AMapJS from "amap-js";
+import Vue from 'vue';
+export default {
+    name: "PathView",
+    props:{
+        orderNumber:'',
+        capacityNumber:'',
+        startPointName:'',
+        endPointName:'',
+        startTime:'',
+        endTime:'',
+    },
+    setup(){
+        const map = shallowRef(null);
+        return{
+            map,
+        }
+    },
+     watch:{
+        //监听车牌号变化
+        orderNumber:{
+            deep: true,
+            handler(val, oldVal) {
+                console.log(val)
+                this.initData(val);
+            }
+        }
+    },
+    data() {
+        return {
+            ///che
+            isTimesChoose:false,
+            isActual:true,
+            isPlay:true,
+            passedTime:"12:02:10",
+            sliderVal:0,
+            times:1,
+            totalTime:"11",
+            speedList:["1倍数","2倍数","3倍数"],
+            //已行驶轨迹
+            runRoute:
+            {
+                agl: "44",
+                gtm: "2022年03月09日 16:47:24",
+                hgt: "13",
+                lat: "32.906411535084985",
+                lon: "115.76177868692135",
+                mil: "429409.2",
+                spd: "17.0"
+            },
+            point:"",
+            pointNext:"",
+            loading : null,
+            navgtrSpeed:1,
+            //地图中心位置
+            centerPoint:{
+                    pointLat:"",
+                    pointLon:""
+            },
+            //自定义窗体信息
+            ctmarkes:{
+                lat:"33.015888071433764",
+                lon : "115.96995235868168",
+                title:"豫SE8888",
+                details:"安徽省阜阳市颍东区阜阳舜岳水泥公司,西北方向,155.1米"
+            },
+            //运输详情
+            transportDetail:{
+                //车牌号
+                capacityNumber:'',
+                //规划路线
+                estimateRoute:[
+                    {
+                        lat:"33.015888071433764",
+                        lon : "115.96995235868168"
+                    }
+                ],
+                //规划线路
+                estimatePath:[
+                    [
+                        114.03046212985384,
+                        32.49786984660489
+                    ],
+                    
+                ],
+                //已行驶轨迹
+                runRoute:[
+                      {
+                        agl: "44",
+                        gtm: "2022年03月09日 16:47:24",
+                        hgt: "13",
+                        lat: "32.906411535084985",
+                        lon: "115.76177868692135",
+                        mil: "429409.2",
+                        spd: "17.0"
+                    },
+                ],
+                runPath: [
+                    [
+                        114.03922119568348,
+                        32.49746162481379
+                    ],
+                ],
+                //当前位置
+                currentPointName:"中国达州市通川区",
+                //当前位置经纬度
+                currentPoint:{
+                    lat:"",
+                    lon:""
+                },
+                //起点位置
+                startPointName:"中国达州市通川区", 
+                //起点位置经纬度
+                startPoint:{
+                    lon:"114.03922119568348",
+                    lat:"32.49746162481379"
+                },
+                //终点位置
+                endPointName:"中国成都萧山",
+                //终点位置经纬度   
+                endPoint:{
+                    lon:"115.96995737755431",
+                    lat:"33.01595479752097"
+                },
+                //自定义标记
+                content:[],
+                //异常位置
+                abnormalLocation:[],
+            
+            },
+            listPath:[
+                
+            ],
+            //组件
+            pathSimplifierIns:{},
+            pathNavigator:{}
+        };
+    },
+    created(){
+        let that=this;
+         that.initData(that.orderNumber)
+    },
+    mounted() {
+        
+    },
+    methods: {
+        geocoder(){
+            AMap.plugin('AMap.Geocoder', function() {
+            var geocoder = new AMap.Geocoder({
+                // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
+                city: '全球'
+            })
+            
+            var lnglat = [116.396574, 39.992706]
+            console.log("fsdaf")
+            geocoder.getAddress(lnglat, function(status, result) {
+                console.log(result)
+                if (status === 'complete' && result.info === 'OK') {
+                    // result为对应的地理位置详细信息
+                    console.log(result)
+                }
+            })
+            })
+        },
+        play(){
+            let that =this;
+            that.pathNavigator.resume();
+        },
+        stop(){
+            let that =this;
+            that.pathNavigator.pause();
+            this.geocoder()
+        },
+        addIndex(){
+            console.log("1123")
+
+            let that =this;
+            let increment=(that.listPath[0].runPath.length*0.1)
+            that.pathNavigator.start(((that.point+increment)%that.listPath[0].runPath.length))
+        },
+        ///che
+        navgControl(){
+
+        },
+        hideFormat(value){
+            let that=this;
+            that.sliderVal=value;
+        },
+        initData(orderNumber){
+            let that=this;
+             that.axios.post("/api/v1/otms/fullPath?orderNumber="+orderNumber).then((res) => {
+                that.listPath=res.data.startAndEndRoutes
+                // res.startAndEndRoutes.forEach((item,index)=>{
+                //     that.transportDetail.estimateRoute=item.estimateRoute;
+                     that.initMap();
+                // });
+            });
+        },
+        endline(){
+            let that=this;
+            that.initPolyline(that.listPath[0].estimatePath,"#FF0000");
+        },
+        //创建起点终点当前点
+        threeMarker(){
+            let that=this;
+            that.listPath.forEach((element,index) => {
+                //开始标记点
+                if(element.startPoint.lon!=''&&element.startPoint.lat!=''){
+                    that.initMarkes(20,35,require('@/assets/img/start.png'),element.startPoint.lon,element.startPoint.lat,'起点');
+                }
+                //结束标记点
+                if(element.endPoint.lon!=''&&element.endPoint.lat!=''){
+                    that.initMarkes(20,35,require('@/assets/img/end.png'),element.endPoint.lon,element.endPoint.lat,'终点');
+                }
+            });
+           
+        },
+        //初始化地图
+        initMap(){
+            lazyAMapApiLoaderInstance.load().then(() => {
+                let that=this;
+                that.map = new AMap.Map("amap-container",{  //设置地图容器id
+                    viewMode:"2D",    //是否为2D地图模式
+                    zoom:10,           //初始化地图级别
+                    center:[105.602725,37.076636], //初始化地图中心点位置
+                });
+                that.initPathSimplifier();
+                that.threeMarker();
+                console.log("that.listPath[0]",that.listPath)
+                that.initCustomMarkes(that.capacityNumber+"("+that.listPath[0].miled+")",that.listPath[0].currentPointName,that.listPath[0].currentPoint.lon,that.listPath[0].currentPoint.lat)
+                that.endline();
+            });
+        },
+        initCustomMarkes(title,details,lon,lat){
+             let that=this;
+            //自定义窗体内容
+            var content = [
+                "<div  style='top:1px;width: 180px; background-color: rgba(0, 0, 0, 1);' ><font color='white'>"+title+"</font>",
+                "<div style='background-color:rgba(255, 255, 255, 0.5);'><font color='white'>"+details+"</font></div></div>"
+            ];
+            // 创建 infoWindow 实例	
+            var infoWindow = new AMap.InfoWindow({
+                content: content.join("<br>")  //传入 dom 对象,或者 html 字符串
+            });
+            // 打开信息窗体
+            infoWindow.open(that.map,[lon,lat]);
+        },
+        initPolyline(path,color){
+            let that=this;
+             //预计轨迹
+            var endLine = new AMap.Polyline({
+                map:that.map,
+                path: path,
+                isOutline: true,
+                outlineColor: color,
+                borderWeight: 0,
+                strokeColor: "#FF0000", 
+                strokeOpacity: 1,
+                strokeWeight: 5,
+                // 折线样式还支持 'dashed'
+                strokeStyle: "solid",
+                // strokeStyle是dashed时有效
+                strokeDasharray: [10, 5],
+                lineJoin: 'round',
+                lineCap: 'round',
+                zIndex: 50,
+            })
+            that.map.setFitView([[ endLine ]])
+        },
+        //创建简单的标记
+        initMarkes(weight,height,image,lon,lat,title){
+            let that=this;
+            //图标标记点
+            let pointicon = new AMap.Icon({
+                size: new AMap.Size(weight, height), // 图标尺寸
+                image: image, // Icon的图像
+                imageOffset: new AMap.Pixel(0,0), // 图像相对展示区域的偏移量,适于雪碧图等
+                imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
+            });
+            // 创建一个 Marker 实例:
+            var pointmarker = new AMap.Marker({
+                position: new AMap.LngLat(lon, lat),   // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+                icon: pointicon, 
+                title: title
+            });
+            // 将创建的点标记添加到已有的地图实例:
+            that.map.add(pointmarker);
+        },
+        //创建轨迹和巡航器
+        initPathSimplifier() {
+            let that=this;
+            // ...你的操作
+            new AMapUI.load(['ui/misc/PathSimplifier'], (PathSimplifier) => {
+                if (!PathSimplifier.supportCanvas) {
+                    alert('当前环境不支持 Canvas!')
+                    return
+                }
+                //创建轨迹和巡航器
+                // 创建组件实例
+                that.pathSimplifierIns = new PathSimplifier({
+                    map: that.map,
+                    zIndex: 100, // 图层叠加顺序
+                    data: that.listPath, // 巡航路径
+                    // 获取巡航路径中的路径坐标数组
+                    getPath: (pathData, pathIndex) => {
+                        return pathData.runPath;
+                    },
+                    //鼠标悬浮停时显示消息
+                    getHoverTitle: function(pathData, pathIndex, pointIndex) {
+                        //返回鼠标悬停时显示的信息
+                        if (pointIndex >= 0) {
+                            if(pathData.runRoute[pointIndex].gtm!=='undefined'){
+                                 //鼠标悬停在某个轨迹节点上
+                                return pathData.runRoute[pointIndex].gtm + ',速度'+ pathData.runRoute[pointIndex].spd+'千米/小时,点:' + pointIndex + '/' + pathData.runPath.length;
+                            }
+                        }
+                    },
+                    //设置轨迹样式
+                    renderOptions: {
+                        //轨迹线的样式
+                        pathLineStyle: {
+                            strokeStyle: 'black',
+                            lineWidth: 6,
+                            dirArrowStyle: true
+                        }
+                    }
+                })
+                // 创建巡航器
+                that.pathNavigator = that.pathSimplifierIns.createPathNavigator(0, {
+                    loop: true, // 是否循环
+                    speed: 1000 ,// 速度(km/h)
+                    pathNavigatorStyle: {
+                        width: 20,
+                        height: 40,
+                        content:PathSimplifier.Render.Canvas.getImageContent( require('@/assets/img/smallcar.png'), onload, onerror),
+                        strokeStyle: null,
+                        fillStyle: null
+                    }
+                })
+                //开启巡航
+                that.pathNavigator.start()
+                
+                //开始事件
+                that.pathNavigator.on("start resume", function() {
+                    // that.navgtr._startTime = Date.now();
+                    // that.navgtr._startDist = this.getMovedDistance();
+                });
+                //暂停
+                that.pathNavigator.on("stop pause", function() {
+                    // that.navgtr._movedTime = Date.now() - that.navgtr._startTime;
+                    // that.navgtr._movedDist = this.getMovedDistance() - that.navgtr._startDist;
+                });
+                that.pathNavigator.on('move', function (data,value) {
+                    that.updateLable(value)
+                });
+            })
+        },
+        updateLable(value){
+            let that=this;
+            that.point=value.dataItem.pointIndex;
+            that.runRoute=value.dataItem.pathData.runRoute[that.point];
+            that.sliderVal=(value.dataItem.pointIndex/value.dataItem.pathData.runRoute.length)*100;
+        },
+        changeSpeed(value){
+            // console.log(value)
+            // let that=this;
+            // that.times=value;
+            
+        },
+        playIcon(){
+            console.log("nihoa")
+        }
+                  
+    }
+};
+</script>
+<style>
+.controller{
+    width: 250px; height: 260px; 
+    background: white;
+   position: absolute;z-index:99;top:0;left:0
+}
+.container{
+    width: 100%;
+	height: 100%;
+    
+}
+.item_details {
+    display: block;
+    margin-top: 20px;
+    position: relative;
+    left: 30px;
+    height: 0px;
+}
+#amap-container {
+    position: relative;
+	width: 100%;
+	height: 100%;
+	overflow: hidden;
+	margin: 0;
+	font-family: "微软雅黑";
+}
+
+
+/* 进度条 */
+.mySlider {
+
+    width: 150px;
+    height: 20px;
+    display: inline-block;
+    position: relative;
+    left: 32px;
+}
+.play {
+    position: relative;
+    left: 28px;
+}
+.quickly
+{
+    float: right;
+    position: relative;
+    left: -20px;
+    top: 10px;
+}
+.pause {
+    position: relative;
+    left: 28px;
+}
+.passed-time{
+    position: relative;
+    left: 5px;
+}
+.end-time{
+    position: relative;
+    left: 5px;
+}
+.map-times {
+    position: relative;
+    background-color: red;
+    width: 40px;
+}
+
+
+
+</style>

+ 90 - 0
src/views/sale/components/offSiteTransportation/slider.vue

@@ -0,0 +1,90 @@
+<template>
+    <div class="slider" ref="slider">
+        <div class="process" :style="{width}"></div>
+        <div class="thunk" ref="trunk" :style="{left}">
+            <div class="block"></div>
+            <div class="tips">
+            <span>{{scale*100}}</span>
+            <i class="fas fa-caret-down" ></i>
+        </div>
+        </div>
+    </div>
+</template>
+<script>
+  /*
+  * min 进度条最小值
+  * max 进度条最大值
+  * v-model 对当前值进行双向绑定实时显示拖拽进度
+  * */
+  export default{
+      name: "slider",
+      props:['min','max','value'],
+      data(){
+        return{
+          slider:null,        //滚动条DOM元素
+          thunk:null,         //拖拽DOM元素
+          per:this.value,     //当前值
+        }
+      },
+      //渲染到页面的时候
+      mounted () {
+        this.slider = this.$refs.slider;
+        this.thunk = this.$refs.trunk;
+        var _this = this;
+        this.thunk.onmousedown = function (e) {
+            var width = parseInt(_this.width);
+            var disX = e.clientX;
+            document.onmousemove = function(e){
+                // value, left, width
+                // 当value变化的时候,会通过计算属性修改left,width
+
+                // 拖拽的时候获取的新width
+                var newWidth = e.clientX - disX + width;
+                // 拖拽的时候得到新的百分比
+                var scale = newWidth / _this.slider.offsetWidth;
+                _this.per = Math.ceil((_this.max - _this.min) * scale + _this.min);
+                _this.per = Math.max(_this.per,_this.min);
+                _this.per = Math.min(_this.per,_this.max);
+                _this.$emit('input', _this.per)
+            }
+            document.onmouseup = function(){
+                document.onmousemove = document.onmouseup = null;
+            }
+            return false;
+        }
+      },
+      computed:{
+        // 设置一个百分比,提供计算slider进度宽度和trunk的left值
+        // 对应公式为  当前值-最小值/最大值-最小值 = slider进度width / slider总width
+        // trunk left =  slider进度width + trunk宽度/2
+        scale(){
+          return (this.per - this.min) / (this.max - this.min);
+        },
+        width(){
+          if(this.slider){
+            return this.slider.offsetWidth * this.scale + 'px';
+          }else{
+            return 0 + 'px'
+          }
+        },
+       left(){
+          if(this.slider){
+            return this.slider.offsetWidth * this.scale -  this.thunk.offsetWidth/2  + 'px';
+          }else{
+            return 0 + 'px'
+          }
+        }
+      },
+  }
+</script>
+<style>
+  .box{margin:100px auto 0;width:80%}
+  .clear:after{content:'';display:block;clear:both}
+  .slider{position:relative;margin:20px 0;width:400px;height:10px;background:#e4e7ed;border-radius:5px;cursor:pointer}
+  .slider .process{position:absolute;left:0;top:0;width:112px;height:10px;border-radius:5px;background:#409eff}
+  .slider .thunk{position:absolute;left:100px;top:-7px;width:20px;height:20px}
+  .slider .block{width:20px;height:20px;border-radius:50%;border:2px solid #409eff;background:rgba(255,255,255,1);transition:.2s all}
+  .slider .tips{position:absolute;left:-7px;bottom:30px;min-width:15px;text-align:center;padding:4px 8px;background:#000;border-radius:5px;height:24px;color:#fff}
+  .slider .tips i{position:absolute;margin-left:-5px;left:50%;bottom:-9px;font-size:16px;color:#000}
+  .slider .block:hover{transform:scale(1.1);opacity:.6}
+</style>

+ 5 - 4
src/views/sale/components/saleSelfMachine/printScan.vue

@@ -4,7 +4,7 @@
             <img :src="backgroundImgURL" width="100%" height="100%"/>
             <img :src="backgroundImgURL" width="100%" height="100%"/>
         </div>
         </div>
         <div class="orderNumberData">
         <div class="orderNumberData">
-            <el-input placeholder="请将二维码放置在扫描区" v-model="orderNumber" :focus="true" @blur="onInputBlur" ref="inputs">
+            <el-input placeholder="请将二维码放置在扫描区" v-model="orderNumber" :focus="true" ref="inputs">
             </el-input>
             </el-input>
         </div>
         </div>
     </div>    
     </div>    
@@ -26,7 +26,6 @@ export default {
     methods:{
     methods:{
         //输入框自动聚焦
         //输入框自动聚焦
         changfouce(){
         changfouce(){
-            console.log("enter")
         this.$nextTick((x)=>{
         this.$nextTick((x)=>{
         this.$refs.inputs.focus();
         this.$refs.inputs.focus();
         })
         })
@@ -49,13 +48,15 @@ export default {
         //     console.log("false")
         //     console.log("false")
             this.changfouce();
             this.changfouce();
         //}
         //}
-        if(this.orderNumber!=null&&this.orderNumber.length==21){
+         if(this.orderNumber!=null&&this.orderNumber.length==21){
             if(this.orderNumber.startsWith('WYSDD')==true||this.orderNumber.startsWith('wysdd')==true){
             if(this.orderNumber.startsWith('WYSDD')==true||this.orderNumber.startsWith('wysdd')==true){
+          
             this.$router.push({
             this.$router.push({
                 path:"/saleSelfMachine?orderNumber="+this.orderNumber,
                 path:"/saleSelfMachine?orderNumber="+this.orderNumber,
             })
             })
+            }
             }   
             }   
-        }
+        
     },3000)
     },3000)
     this.$once('hook:beforeDestroy', ()=>{
     this.$once('hook:beforeDestroy', ()=>{
         clearInterval(timer)
         clearInterval(timer)

+ 59 - 149
src/views/sale/components/saleSelfMachine/printWarranty.vue

@@ -1,132 +1,24 @@
 <template>
 <template>
-  <div class="tableAllDate">
+  <div class="tableAllDate"> 
+     <!-- <div>
+       <el-table
+       v-loading="loading"
+       style="width: 100%">
+      </el-table>
+     </div>  -->
+     <div class="loading"  v-if="urls.length==0"></div>
       <div id="pdfDom">
       <div id="pdfDom">
       <div class="blank">
       <div class="blank">
       </div>
       </div>
-      <div class="title">
-        <h1 align="center">达州钢铁集团有限责任公司</h1>
-        <h1 align="center">质保书</h1>
+    <div class="demo-image__lazy" v-for="(img,index) in urls" :key="index">
+       <!-- <el-image v-for="(img,index) in urls" :key="index" :src="img" lazy></el-image> -->
+       <el-image   style='width: 100%; height: 100%; justify-content: center;
+            align-items: center;' :src='img'></el-image>
+     </div> 
       </div>
       </div>
-      <div>
-      <!-- tablePart0 -->
-        <table border="0" cellpadding="10" cellspacing="0" style="margin: auto;font-size:20px;" width="1000px" class="tablePart0">
-        <tr>
-          <th style="width :14.5%">收货单位:</th>
-          <td style="width :85.5%">{{consigeeName}}</td>
-        </tr>
-        </table>
-      </div>
-      <div class="tableBody">
-        <!-- tablePart1 -->
-        <table border="1" cellpadding="10" cellspacing="0" style="margin-top: 5px;" width="1000px" class="tablePart1">
-        <tr>
-          <th style="width :5%">序号</th>
-          <th style="width :21.5%">物资(设备)名称</th>
-          <th style="width :21.5%">规格型号</th>
-          <th style="width :5%">单位</th>
-          <th style="width :14%">应发数量</th>
-          <th style="width :14%">实发数量</th>
-          <th style="width :19%">备注</th>
-        </tr>
-
-        <tr>
-          <td>1</td>
-          <td>{{materialList[0].materialName}}</td>
-          <td>{{materialList[0].materialSpe}}{{materialList[0].materialModel}}</td>
-          <td>吨</td>
-          <td></td>
-          <td>{{materialList[0].materialNumber}}</td>
-          <td></td>
-        </tr>
-        <tr>
-          <td>2</td>
-          <td>{{materialList[1].materialName}}</td>
-          <td>{{materialList[1].materialSpe}}{{materialList[1].materialModel}}</td>
-          <td>吨</td>
-          <td></td>
-          <td>{{materialList[1].materialNumber}}</td>
-          <td></td>
-        </tr>
-        <tr>
-          <td>3</td>
-          <td></td>
-          <td></td>
-          <td></td>
-          <td></td>
-          <td></td>
-          <td></td>
-        </tr>
-        <tr>
-          <td>4</td>
-          <td></td>
-          <td></td>
-          <td></td>
-          <td></td>
-          <td></td>
-          <td></td>
-        </tr>
-        </table>
-        <!-- tablePart2 -->
-        <table border="1" cellpadding="10" cellspacing="0" style="
-        border-top: 0px" width="1000px" class="tablePart2">
-        <tr>
-          <th style="width :10.5%">送货人</th>
-          <td style="width :16.5%">张三</td>
-          <th style="width :14%">发货时间</th>
-          <td style="width :12%">2021-12-08 11:08:32</td>
-          <th style="width :14%">收货地点</th>
-          <td style="width :33%">重庆市巴南区东温泉镇雨台村</td>
-        </tr>
-        </table>
-        <!-- tablePart3 -->
-        <table border="1" cellpadding="10" cellspacing="0" style="
-        border-top: 0px" width="1000px" class="tablePart3">
-        <tr>
-          <th style="width :10.5%">收货人</th>
-          <td style="width :56.5%">吴刚</td>
-          <th style="width :14%">收货日期</th>
-          <td style="width :19%">2021-12-09</td>
-        </tr>
-        </table>
-        <!-- tablePart4 -->
-        <table border="1" cellpadding="10" cellspacing="0" style="
-        border-top: 0px" width="1000px" class="tablePart4">
-        <tr>
-          <th style="width :10.5%">司机</th>
-          <td style="width :36.5%">张三</td>
-          <th style="width :13%">车号</th>
-          <td style="width :40%">{{capacityNumber}}</td>
-        </tr>
-        </table>
-        <!-- tablePart5 -->
-        <table border="1" cellpadding="10" cellspacing="0" style="
-        border-top: 0px" width="1000px" class="tablePart5">
-        <tr>
-          <th style="width :10.5%">备注</th>
-          <td style="width :89.5%">无</td>
-        </tr>
-        </table>
-      </div>
-      <div>
-        <!-- tablePart6 -->
-        <table border="0" cellpadding="10" cellspacing="0" style="margin: auto;margin-top: 5px;font-size:20px;" width="1000px" class="tablePart6">
-        <tr>
-          <th style="width :14.5%">发货单位:</th>
-          <td style="width :48.5%">达州钢铁集团有限责任公司</td>
-          <th style="width :15.5%">日期:</th>
-          <td style="width :5%">{{year}}</td>
-          <th style="width :8%">年</th>
-          <td style="width :3%">{{month}}</td>
-          <th style="width :8%">月</th>
-          <td style="width :3%">{{date}}</td>
-          <th style="width :5%">日</th>
-        </tr>
-        </table>
-      </div>
-      </div>
-      <el-button style="margin-left: 45%;" type="primary" @click="getPdf()">
+      <!-- <el-button style="margin-left: 45%;" type="primary" @click="getPdf()">
         <i class="el-icon-download"></i>导出(pdf)
         <i class="el-icon-download"></i>导出(pdf)
-      </el-button>
+      </el-button> -->
       <el-button style="margin-left: 45%;margin-top: 0.2%;" type="primary" v-print="'#pdfDom'" @click="backScan()">
       <el-button style="margin-left: 45%;margin-top: 0.2%;" type="primary" v-print="'#pdfDom'" @click="backScan()">
         <i class="el-icon-printer"></i>打印
         <i class="el-icon-printer"></i>打印
       </el-button>
       </el-button>
@@ -140,42 +32,51 @@ export default {
   name: "Login",
   name: "Login",
   data() {
   data() {
     return {
     return {
-      orderNumber: "WYSDD2021120200000803",
-      carrierName: null,
-      materialList: [
-        {
-            "materialName": "三级螺纹钢定尺12米",
-            "materialModel": "HRB400E",
-            "materialWeight": null,
-            "materialNumber": 12222,
-            "materialSpe": "Φ20"
-        },
-        {
-            "materialName": "五螺纹钢定尺12米",
-            "materialModel": "HRB400",
-            "materialWeight": null,
-            "materialNumber": 12000,
-            "materialSpe": "Φ14"
-        },
-      ],
-      capacityNumber: "川A10011",
-      consigeeName: null,
-      billDate: "2021-12-07",
-      year: new Date().getFullYear(),
-      month: new Date().getMonth()+1,
-      date: new Date().getDate(),
-      htmlTitle: '质保书'
+      urls:[],
+      name: 'Loading'
     };
     };
+  }, 
+  mounted() {
+    this.information();
   },
   },
   methods: {
   methods: {
+     information() {
+      //编辑
+      console.log("this.$route.query.orderNumber",this.$route.query.orderNumber)
+      this.axios
+        .post(
+          "/api/v1/uc/getWarranty?orderNumber="+this.$route.query.orderNumber 
+        )
+        .then((res) => {
+          console.log("res.data.data",res.data.data)
+          console.log("res.data.code",res.data.code)  
+          if(res.data.data==-1){
+            this.$message("质保书正在紧张制作中,请耐心等待!")
+          }else if(res.data.data==-2) {
+            this.$message("该车还未装货")
+          }else{
+            res.data.data.forEach((e) => {
+              console.log(e)
+              this.urls.push(e)
+          
+            })
+          }
+        });
+        },
+       
+        
       backScan(){
       backScan(){
         this.$router.go(-2);
         this.$router.go(-2);
-      }
+      },
+      
   },
   },
 };
 };
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
+.demo-image__lazy{
+  position: relative;
+}
 .title{
 .title{
   font-size:25px;
   font-size:25px;
 }
 }
@@ -206,4 +107,13 @@ export default {
   width: 100%;
   width: 100%;
   height: 50px;
   height: 50px;
 }
 }
+.loading {
+  position: fixed;
+  left: 0;
+  top: 0;
+  background: url('~@/assets/loading_images/loading.gif') center center no-repeat #fff;
+  width: 100vw;
+  height: 100vh;
+  z-index: 1000;
+}
 </style>
 </style>

+ 1 - 1
src/views/sale/components/transport_appointment/openDistributionSection.vue

@@ -109,7 +109,7 @@ export default {
     },
     },
     //打开线路模态框
     //打开线路模态框
     tableOpen(){
     tableOpen(){
-        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3"+"&i=" + new Date(),
+        this.line.requestUrl = "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con="+"销售"+"&i=" + new Date(),
          this.table = true;
          this.table = true;
     },
     },
     // 返回
     // 返回

+ 96 - 105
src/views/sale/components/transport_excute/tms-offsite/arrivalResult.vue

@@ -1,129 +1,120 @@
 <template>
 <template>
-  <!-- 抵达实绩信息页面 -->
-  <div class="arrivalResult">
-    <div class="top">
-      <el-form :inline="true" style="margin-top: 0.5rem;">
-        <el-form-item>
-          <label class="el-form-item__label" style="width: auto;">时间段</label>
-         <el-date-picker
-      v-model="dateValue"
-      type="daterange"
-      range-separator="至"
-      start-placeholder="开始日期"
-      end-placeholder="结束日期">
-    </el-date-picker>
-        </el-form-item>
-
-        <el-form-item>
-      <label class="el-form-item__label" style="width: auto;">产品分类</label>
-      <el-autocomplete
-        popper-class="my-autocomplete"
-        v-model="inputValue"
-        :fetch-suggestions="querySearch"
-        placeholder="请输入内容" 
+  <!-- 抵达页面 -->
+   <div class="purchasFuelNewMonitor">
+    <div class="frameCalculation">
+      <span>抵达时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
       >
       >
-        <i class="el-icon-edit el-input__icon" slot="suffix"> </i>
-      </el-autocomplete>
-        </el-form-item>
-        <el-form-item>
-      <label class="el-form-item__label" style="width: auto;margin-top: 0.4rem;">车牌号</label>
-      </el-form-item>
-      <el-form-item>
-          <el-input class="el-form-item__content" v-model="capacityNumber1" placeholder="请输入内容"></el-input>
-      </el-form-item>
-      <el-form-item>
-          <label class="el-form-item__label" style="width: auto;margin-top: 0.4rem;">收货单位</label>
-      </el-form-item>
-      <el-form-item>
-          <el-input v-model="consigneeCompanyName1" placeholder="请输入内容"></el-input>
-      </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="onSearch"><i class="el-icon-search"></i>查询</el-button>
-        </el-form-item>
-      </el-form>
-
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker
+        v-model="endTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+        <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        clearable>
+      </el-input>
+      <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>
+      <el-button type="primary" @click="refresh">
+        <i class="el-icon-refresh"></i>刷新
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+             <el-button
+              type="text"
+              size="mini"
+              @click="photo(scope)"
+            >
+              满货箱照片
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
     </div>
     </div>
-
-    <dilTable ref="tab" v-bind.sync="option">
-      <el-table-column fixed="right" label="操作" width="110">
-        <template slot-scope="scope">
-          <el-button @click="toPhotoClick(scope.row.resultFullContainerPhoto)" type="text" size="small" style="font-size: 17px"
-            >浏览图片</el-button
-          >
-        </template>
-      </el-table-column>
-    </dilTable>
   </div>
   </div>
 </template>
 </template>
 
 
-
 <script>
 <script>
-
+import { sjTime } from '@/utils/sharedJsFile';
 export default {
 export default {
-  name: "arrivalResult",
+  name: "homeworkPath",
   data() {
   data() {
     return {
     return {
-      dateValue:[new Date(), new Date()],
-      inputValue:"",
-      capacityNumber1:"",
-      consigneeCompanyName1:"",
-      status: "",
-      state: "",
-      option: {       
+      restaurants: [],
+      input: "",
+      startTime: null,
+      endTime: null,
+      option: {
         // 表格请求数据的地址
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getArrivalResultInfo?apiId=136",
+        requestUrl: "/api/v1/tms/getReceiptResult?apiId=470",
       },
       },
     };
     };
   },
   },
-  mounted() {
-    this.restaurants = this.loadAll();
+  created(){
+   
   },
   },
   methods: {
   methods: {
-    querySearch(queryString, cb) {
-      var restaurants = this.restaurants;
-      var results = queryString
-        ? restaurants.filter(this.createFilter(queryString))
-        : restaurants;
-      cb(results);
-    },
-    createFilter(queryString) {
-      return (restaurant) => {
-        return (
-          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
-          0
-        );
-      };
+    photo(scope){
+      console.log(scope.row.orderNumber)
+     this.axios
+       .post("/api/v1/tms/getReceiptPhoto?orderNumber="+scope.row.orderNumber)
+       .then((res)=>{
+         console.log("res.data.data",res.data.data)
+       });
     },
     },
-    loadAll() {
-      return [
-        { value: "带钢"},
-        { value: "微粉"},
-        { value: "螺纹钢"},
-        { value: "钢坯"},
-        { value: "其他"},
-      ];
-    },
-
-    onSearch(){
-      //改变查询条件
-      this.$refs.tab.setDataRequestQuery({"startTime":sjTime(this.dateValue[0]),
-                      "endTime": sjTime(this.dateValue[1]),
-                      "productClassification": this.inputValue,
-                      "capacityNumber1": this.capacityNumber1,
-                      "consigneeCompanyName1": this.consigneeCompanyName1});                         
-    },
-
-    toPhotoClick(resultFullContainerPhoto){
-      this.$router.push("/arrivalPhoto?resultFullContainerPhoto="+resultFullContainerPhoto);
-      
-    }
+    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){
+          this.option.requestUrl = '/api/v1/tms/getReceiptResult?apiId=470' + "&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date()+"&con="+this.input; 
+        }else{
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning('开始时间要比结束时间早')
+        }
+      }else{
+        console.log(startTime && endTime)
+         this.option.requestUrl = '/api/v1/tms/getReceiptResult?apiId=470' + "&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date()+"&con="+this.input; 
+      }
     },
     },
+   }
 };
 };
 </script>
 </script>
 <style lang='scss' scoped>
 <style lang='scss' scoped>
-.homeworkPath {
-  .top {
-    padding: 20px 30px;
+.purchasFuelNewMonitor {
+  .frameCalculation {
+    width: 100%;
+    height: 100px;
+    display: flex;
+    align-items: center;
+    padding-left: 50px;
+    .el-date-editor{
+      margin: 20px;
+    }
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
   }
   }
 }
 }
 </style>
 </style>

+ 3 - 3
src/views/sale/components/transport_order/receiveOrder.vue

@@ -357,13 +357,13 @@ export default {
           "&con=" +
           "&con=" +
           this.inputText;
           this.inputText;
       } else if (this.activeName == "second") {
       } else if (this.activeName == "second") {
-        this.option1.requestUrl =
-          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&carrierSsoId=" +
+        this.option2.requestUrl =
+          "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=6&carrierSsoId=" +
           getCookie("userId") +
           getCookie("userId") +
           "&con=" +
           "&con=" +
           this.inputText;
           this.inputText;
       } else {
       } else {
-        this.option1.requestUrl =
+        this.option3.requestUrl =
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=4&carrierSsoId=" +
           "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=4&carrierSsoId=" +
           getCookie("userId") +
           getCookie("userId") +
           "&con=" +
           "&con=" +

+ 6 - 2
src/views/sale/router/index.js

@@ -60,7 +60,7 @@ import smsResult from '../components/transport_excute/outFactory/smsResult.vue'
 import arrivalPhoto from '../components/transport_excute/tms-offsite/arrivalPhoto.vue'
 import arrivalPhoto from '../components/transport_excute/tms-offsite/arrivalPhoto.vue'
 import arrivalResult from '../components/transport_excute/tms-offsite/arrivalResult.vue'
 import arrivalResult from '../components/transport_excute/tms-offsite/arrivalResult.vue'
 import distance from '../components/transport_excute/tms-offsite/distance.vue'
 import distance from '../components/transport_excute/tms-offsite/distance.vue'
-import inTransit from '../components/transport_excute/tms-offsite/inTransit.vue'
+// import inTransit from '../components/transport_excute/offSiteTransportation/inTransit.vue'
 import inTransitAbnormal from '../components/transport_excute/tms-offsite/inTransitAbnormal.vue'
 import inTransitAbnormal from '../components/transport_excute/tms-offsite/inTransitAbnormal.vue'
 import inTransitAlarm from '../components/transport_excute/tms-offsite/inTransitAlarm.vue'
 import inTransitAlarm from '../components/transport_excute/tms-offsite/inTransitAlarm.vue'
 import inTransitOrderMileage from '../components/transport_excute/tms-offsite/inTransitOrderMileage.vue'
 import inTransitOrderMileage from '../components/transport_excute/tms-offsite/inTransitOrderMileage.vue'
@@ -98,6 +98,10 @@ import bmsTruckInvoice from '../components/transportFreight/saleTruckSettlement/
 import bmsTruckStatement from '../components/transportFreight/saleTruckSettlement/bmsTruckStatement.vue'
 import bmsTruckStatement from '../components/transportFreight/saleTruckSettlement/bmsTruckStatement.vue'
 import getBmsTruckStatementOrder from '../components/transportFreight/saleTruckSettlement/getBmsTruckStatementOrder.vue'
 import getBmsTruckStatementOrder from '../components/transportFreight/saleTruckSettlement/getBmsTruckStatementOrder.vue'
 import getTransportResult from '../components/transportFreight/saleTruckSettlement/getTransportResult.vue'
 import getTransportResult from '../components/transportFreight/saleTruckSettlement/getTransportResult.vue'
+import mapTest from '../components/offSiteTransportation/mapTest.vue'
+import inTransit from '../components/offSiteTransportation/inTransit.vue'
+//测试数据
+
 Vue.use(Router)
 Vue.use(Router)
 const constantRouterMap = [
 const constantRouterMap = [
 	{
 	{
@@ -200,10 +204,10 @@ const constantRouterMap = [
 		{path: 'bmsTruckStatement', name: 'bmsTruckStatement', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckStatement},
 		{path: 'bmsTruckStatement', name: 'bmsTruckStatement', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckStatement},
 		{path: 'getBmsTruckStatementOrder/:statementId', name: 'getBmsTruckStatementOrder', meta: {code: 'xtpzgl-yhgl'}, component: getBmsTruckStatementOrder},
 		{path: 'getBmsTruckStatementOrder/:statementId', name: 'getBmsTruckStatementOrder', meta: {code: 'xtpzgl-yhgl'}, component: getBmsTruckStatementOrder},
 		{path: 'getTransportResult/:orderId', name: 'getTransportResult', meta: {code: 'xtpzgl-yhgl'}, component: getTransportResult},
 		{path: 'getTransportResult/:orderId', name: 'getTransportResult', meta: {code: 'xtpzgl-yhgl'}, component: getTransportResult},
+		{path: 'mapTest', name: 'mapTest', meta: {code: 'xtpzgl-yhgl'}, component: mapTest},
 	  ]
 	  ]
 	}
 	}
   ];
   ];
-  
   const router = new Router({
   const router = new Router({
 	routes: constantRouterMap
 	routes: constantRouterMap
   })
   })

+ 46 - 0
src/views/statisticalReport/components/defendCapacity/getCapacityByDefend.vue

@@ -0,0 +1,46 @@
+<template>
+  <!-- 抽查车牌号页面 -->
+  <div class="homeworkPath">
+   <div class="top">
+      <el-input placeholder="请输入车牌号" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <dilTable v-bind.sync="option"></dilTable>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "homeworkPath",
+  data() {
+    return {
+      restaurants: [],
+      input: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "api/v1/tms/getCapacityByDefend?apiId=469",
+      },
+    };
+  },
+  created(){
+   
+  },
+  methods: {
+    onclick() {
+          this.option.requestUrl="api/v1/tms/getCapacityByDefend?apiId=469&con="+this.input;
+    },
+   }
+};
+</script>
+<style lang='scss' scoped>
+.homeworkPath {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input{
+      width: 20%;
+    }
+  }
+}
+</style>

+ 2 - 0
src/views/statisticalReport/router/index.js

@@ -22,6 +22,7 @@ import getUnLoading from '../components/inwardReport/getUnLoading.vue'
 import purchaseMineral from '../components/purachaseMineral.vue'
 import purchaseMineral from '../components/purachaseMineral.vue'
 import inwardSporadicReport from '../components/sporadicReport/inwardSporadicReport.vue'
 import inwardSporadicReport from '../components/sporadicReport/inwardSporadicReport.vue'
 import getInstall from '../components/inwardReport/getInstall.vue'
 import getInstall from '../components/inwardReport/getInstall.vue'
+import getCapacityByDefend from '../components/defendCapacity/getCapacityByDefend.vue'
 
 
 Vue.use(Router)
 Vue.use(Router)
 
 
@@ -49,6 +50,7 @@ const constantRouterMap = [
       {path: 'purchaseMineral', name: 'purchaseMineral', meta: {code: 'xtpzgl-yhgl'}, component: purchaseMineral},
       {path: 'purchaseMineral', name: 'purchaseMineral', meta: {code: 'xtpzgl-yhgl'}, component: purchaseMineral},
       {path: 'inwardSporadicReport', name: 'inwardSporadicReport', meta: {code: 'xtpzgl-yhgl'}, component: inwardSporadicReport},
       {path: 'inwardSporadicReport', name: 'inwardSporadicReport', meta: {code: 'xtpzgl-yhgl'}, component: inwardSporadicReport},
       {path: 'getInstall', name: 'getInstall', meta: {code: 'xtpzgl-yhgl'}, component: getInstall},
       {path: 'getInstall', name: 'getInstall', meta: {code: 'xtpzgl-yhgl'}, component: getInstall},
+      {path: 'getCapacityByDefend', name: 'getCapacityByDefend', meta: {code: 'xtpzgl-yhgl'}, component: getCapacityByDefend}
     ]
     ]
   }
   }
 ];
 ];

Some files were not shown because too many files changed in this diff