luobang 2 jaren geleden
bovenliggende
commit
84e1d47cd0
100 gewijzigde bestanden met toevoegingen van 8170 en 4069 verwijderingen
  1. 5 0
      .idea/.gitignore
  2. 10 0
      .idea/compiler.xml
  3. 6 0
      .idea/encodings.xml
  4. 9 0
      .idea/icore-pass.iml
  5. 6 0
      .idea/inspectionProfiles/Project_Default.xml
  6. 6 0
      .idea/misc.xml
  7. 8 0
      .idea/modules.xml
  8. 6 0
      .idea/vcs.xml
  9. 2 2
      build/utils.js
  10. 2 2
      config/index.js
  11. 2 1
      package.json
  12. 1 1
      src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.vue
  13. 49 6
      src/components/DilCommonUI/packages/table/src/table.vue
  14. 1 1
      src/components/default.vue
  15. 72 19
      src/components/main.vue
  16. 76 2
      src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue
  17. 6 6
      src/views/RMS/components/oilPrice.vue
  18. 219 161
      src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/transportOrder.vue
  19. 18 16
      src/views/SporadicManage/components/oldAreaSporadic/transportOrder/transportOrder.vue
  20. 261 184
      src/views/SporadicManage/components/sporadicMaterial/transportOrder/transportOrder.vue
  21. 1 3
      src/views/TMS/components/bmsship/addTwoSectionHandleFee.vue
  22. 214 77
      src/views/TMS/components/bmsship/detailsStatement.vue
  23. 18 9
      src/views/TMS/components/bmsship/threeSectionFeeDetails.vue
  24. 6 6
      src/views/TMS/components/bmsship/updateThreeSectionFeeDetails.vue
  25. 1 1
      src/views/TMS/components/bmstruck/detailsTruckOrder.vue
  26. 4 5
      src/views/TMS/components/domesticMine/wagonLoadAdd.vue
  27. 3 3
      src/views/TMS/components/importedEmergency/wagonLoadEmergency.vue
  28. 44 95
      src/views/TMS/components/importedMine/addWagonLoad.vue
  29. 53 248
      src/views/TMS/components/importedMine/addWagonPlease.vue
  30. 15 5
      src/views/TMS/components/importedMine/addWagonloadCopy.vue
  31. 51 251
      src/views/TMS/components/importedMine/editWagonPlease.vue
  32. 111 19
      src/views/TMS/components/importedMine/outBoundWagon.vue
  33. 50 85
      src/views/TMS/components/importedMine/wagonPlease.vue
  34. 188 0
      src/views/TMS/components/importedShip/recordBatch.vue
  35. 11 1
      src/views/TMS/router/index.js
  36. 271 115
      src/views/WMS/components/steel/addSteelInbound.vue
  37. 120 90
      src/views/WMS/components/steel/addSteelReserved.vue
  38. 273 115
      src/views/WMS/components/steel/bar1_steel/bar1_addSteelInbound.vue
  39. 115 90
      src/views/WMS/components/steel/bar1_steel/bar1_addSteelReserved.vue
  40. 135 70
      src/views/WMS/components/steel/bar1_steel/bar1_steel_inbound.vue
  41. 122 97
      src/views/WMS/components/steel/bar1_steel/bar1_steel_inboundStatistics.vue
  42. 28 21
      src/views/WMS/components/steel/bar1_steel/bar1_steel_reserved.vue
  43. 102 0
      src/views/WMS/components/steel/bar1_steel/inboundEas01.vue
  44. 271 115
      src/views/WMS/components/steel/bar2_steel/bar2_addSteelInbound.vue
  45. 121 91
      src/views/WMS/components/steel/bar2_steel/bar2_addSteelReserved.vue
  46. 135 78
      src/views/WMS/components/steel/bar2_steel/bar2_steel_inbound.vue
  47. 122 97
      src/views/WMS/components/steel/bar2_steel/bar2_steel_inboundStatistics.vue
  48. 29 22
      src/views/WMS/components/steel/bar2_steel/bar2_steel_reserved.vue
  49. 102 0
      src/views/WMS/components/steel/bar2_steel/inboundEas02.vue
  50. 103 0
      src/views/WMS/components/steel/inboundEas03.vue
  51. 139 116
      src/views/WMS/components/steel/steel_inbound.vue
  52. 145 118
      src/views/WMS/components/steel/steel_inboundStatistics.vue
  53. 39 38
      src/views/WMS/components/steel/steel_reserved.vue
  54. 21 0
      src/views/WMS/router/index.js
  55. 13 0
      src/views/appoint/components/inward/transPrice.vue
  56. 131 0
      src/views/appoint/components/inward/updateTransPrice.vue
  57. 234 48
      src/views/appoint/components/saleContract/addSaleOrder.vue
  58. 280 38
      src/views/appoint/components/saleContract/editSaleOrder.vue
  59. 18 16
      src/views/appoint/components/saleContract/saleOrderOODetails.vue
  60. 234 108
      src/views/appoint/components/saleContract/saleOrderSteel.vue
  61. 159 5
      src/views/appoint/components/saleContract/transportPrice.vue
  62. 3 1
      src/views/appoint/components/ship/addDeliveryAttorney.vue
  63. 59 6
      src/views/appoint/components/ship/addDeliveryNotice.vue
  64. 1 1
      src/views/appoint/components/ship/attorneytext.vue
  65. 17 0
      src/views/appoint/components/ship/deliveryAttorney.vue
  66. 23 9
      src/views/appoint/components/ship/deliveryNotice.vue
  67. 1 0
      src/views/appoint/components/ship/modifyDeliveryAttroney.vue
  68. 1 1
      src/views/appoint/components/ship/modifyDeliveryNotice.vue
  69. 7 0
      src/views/appoint/router/index.js
  70. 252 226
      src/views/inward/components/inwardFactory/timeTaskResult.vue
  71. 299 78
      src/views/inward/components/inwardSettlement/detailOrder.vue
  72. 125 24
      src/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue
  73. 135 27
      src/views/inward/components/offsetSteel/saleSteelTruckOrder/platformStockInfo.vue
  74. 23 70
      src/views/inward/components/offsetSteel/saleSteelTruckOrder/saleTruckPreview.vue
  75. 150 127
      src/views/inward/components/truckAppoint/addPlan.vue
  76. 129 48
      src/views/inward/components/truckAppoint/addRequirement2.vue
  77. 122 98
      src/views/inward/components/truckAppoint/getRequirementOrder.vue
  78. 4 2
      src/views/inward/components/truckAppoint/plan.vue
  79. 8 4
      src/views/inward/components/truckAppoint/requirement.vue
  80. 8 4
      src/views/inward/components/truckAppoint/requirementOther.vue
  81. 18 16
      src/views/inward/components/truckOrder/dispatchPlan.vue
  82. 126 96
      src/views/inward/components/truckOrder/getPlanOrder.vue
  83. 11 5
      src/views/inward/components/truckOrder/plan.vue
  84. 93 20
      src/views/inward/components/truckOrder/purInwardTruckOrder.vue
  85. 64 5
      src/views/queue/components/qmsEnFacotory/queueFStart.vue
  86. 70 0
      src/views/sale/components/dilNotice/addNotice1.vue
  87. 71 0
      src/views/sale/components/dilNotice/addNotice2.vue
  88. 1 1
      src/views/sale/components/dilNotice/clientNotice.vue
  89. 1 1
      src/views/sale/components/dilNotice/marketingNotice.vue
  90. 84 6
      src/views/sale/components/offSiteTransportation/checkGPS.vue
  91. 177 169
      src/views/sale/components/saleSelfMachine/printReceipt.vue
  92. 100 90
      src/views/sale/components/saleSelfMachine/printScan.vue
  93. 41 15
      src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelDetails.vue
  94. 14 0
      src/views/sale/router/index.js
  95. 205 0
      src/views/statisticalReport/components/ShipWorkReport.vue
  96. 112 107
      src/views/statisticalReport/components/Ship_dynamic_table.vue
  97. 4 2
      src/views/statisticalReport/components/defendCapacity/getCapacityByDefend.vue
  98. 295 0
      src/views/statisticalReport/components/dowmShipDynamicTable.vue
  99. 126 17
      src/views/statisticalReport/components/loadCapacityDetail/loadCapacityDetail.vue
  100. 193 96
      src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelAllReport.vue

+ 5 - 0
.idea/.gitignore

@@ -0,0 +1,5 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/

+ 10 - 0
.idea/compiler.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <option name="USE_RELEASE_OPTION" value="false" />
+    <bytecodeTargetLevel target="8" />
+  </component>
+  <component name="JavacSettings">
+    <option name="ADDITIONAL_OPTIONS_STRING" value="-encoding utf-8" />
+  </component>
+</project>

+ 6 - 0
.idea/encodings.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8">
+    <file url="PROJECT" charset="UTF-8" />
+  </component>
+</project>

+ 9 - 0
.idea/icore-pass.iml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 6 - 0
.idea/inspectionProfiles/Project_Default.xml

@@ -0,0 +1,6 @@
+<component name="InspectionProjectProfileManager">
+  <profile version="1.0">
+    <option name="myName" value="Project Default" />
+    <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
+  </profile>
+</component>

+ 6 - 0
.idea/misc.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="JavaScriptSettings">
+    <option name="languageLevel" value="ES6" />
+  </component>
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/icore-pass.iml" filepath="$PROJECT_DIR$/.idea/icore-pass.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+  </component>
+</project>

+ 2 - 2
build/utils.js

@@ -16,8 +16,8 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 // let devModules = ["index", "appoint", "statisticalReport", "WMS","TMS"];
-let devModules = ["index", "TMS", "appoint", "WMS", "inward", "statisticalReport"];
-// let devModules = ["all"];
+// let devModules = ["index", "TMS", "appoint", "WMS", "queue"];
+let devModules = ["all"];
 
 if (pathSrc.indexOf("node_modules") > -1) {
   devModules = require("../../../cors.js").devModules;

+ 2 - 2
config/index.js

@@ -79,15 +79,15 @@ let proxyTable = {
   "/api/v1": {
     target: "http://172.16.33.166:80",
     // target: "http://localhost:8080",
-    // target: "http://192.168.1.109:8080",
+    // target: "http://192.168.1.101:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"
     }
   },
   "/views/api/v1": {
+    //target: "http://172.16.33.166:80",
     target: "http://172.16.33.166:80",
-    // target: "http://localhost:8080",
     // target: "http://192.168.1.109:8080",
     ws: true,
     pathRewrite: {

+ 2 - 1
package.json

@@ -148,7 +148,8 @@
     "webpack-bundle-analyzer": "^2.9.0",
     "webpack-dev-server": "^2.9.1",
     "webpack-merge": "^4.1.0",
-    "webpack-node-externals": "^1.7.2"
+    "webpack-node-externals": "^1.7.2",
+    "codemirror": "5.65.5"
   },
   "engines": {
     "node": ">= 6.0.0",

+ 1 - 1
src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.vue

@@ -233,7 +233,7 @@ export default {
     // 每页显示个数选择器的选项设置
     pageSizes: {
       default() {
-        return [10, 20, 50, 100, 200, 1000, 50000];
+        return [10, 20, 50, 100, 200, 1000];
       }
     },
     // 每页显示条目个数,支持 .sync 修饰符

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

@@ -23,6 +23,8 @@
       :shiyHeigth="shiyHeigth"
       :id="id"
       :individual-panel="individualPanel"
+      :summary-method="getSummaries"
+      :show-summary="isshowSummary"
     >
       <!-- 多选列 -->
       <el-table-column
@@ -126,6 +128,14 @@ export default {
     shiyHeigth: {
       default: null
     },
+    isshowSummary: {
+      default: false
+    },
+    showSummaryList: {
+      default() {
+        return [];
+      }
+    },
     isHeigth: {
       default: false
     },
@@ -227,7 +237,7 @@ export default {
     // 每页显示个数选择器的选项设置
     pageSizes: {
       default() {
-        return [5, 10, 20, 50, 100, 200, 1000, 50000];
+        return [5, 10, 20, 50, 100, 200, 1000];
       }
     },
     // 每页显示条目个数,支持 .sync 修饰符
@@ -237,11 +247,6 @@ export default {
     //组件布局,子组件名用逗号分隔
     layout: {
       default: "total, prev, pager, next, sizes, jumper"
-    },
-    id:String,
-    individualPanel:{
-      type:Boolean,
-      default:false
     }
   },
   watch: {
@@ -273,6 +278,44 @@ export default {
     },
     toggleRowExpansion(row, expanded) {
       this.$refs.mainTable.toggleRowExpansion(row, expanded);
+    },
+    //合计
+    //表尾合计行
+    getSummaries(param) {
+      console.log(param);
+      const { columns, data } = param;
+      console.log("columns");
+      console.log(columns);
+      console.log("data");
+      console.log(data);
+      const sums = [];
+      columns.forEach((column, index) => {
+        //如果索引值为0,则展示‘合计’
+        if (index === 0) {
+          sums[index] = "合计";
+          return;
+        }
+        console.log(column);
+        if (this.showSummaryList.includes(column.property)) {
+          const values = data.map(item => Number(item[column.property]));
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return prev + curr;
+              } else {
+                return prev;
+              }
+            }, 0);
+            sums[index] = sums[index].toFixed(3);
+          } else {
+            sums[index] = "N/A";
+          }
+        }
+        //遍历数组,找到符合条件的列
+      });
+
+      return sums;
     }
   }
 };

+ 1 - 1
src/components/default.vue

@@ -50,7 +50,7 @@ export default {
         }
     }).catch((err) =>{
         window.top.localStorage.setItem('activeMenu',item.menuId)
-        that.$emit('gotoSetPage', item);           
+        that.$emit('gotoSetPage', item);
     })
     },
     getTop10 () {

+ 72 - 19
src/components/main.vue

@@ -62,7 +62,7 @@
                     </li> -->
             <li @click="signOut">
                 <span class="st-icons st-icons-out"></span>退出登录
-            </li>        
+            </li>
           </ul>
         </div>
       </div>
@@ -326,28 +326,36 @@
               >
             </el-breadcrumb>
           </div>
-          <div class="sl-header-li-websocket">
+          <div class="sl-header-li-websocket" @mouseenter="updatecss" @mouseleave="leave">
             <el-badge
-              :value="task1Num + task2Num"
+              :value="taskAllNum"
               :max="99"
               class="item"
               style="margin-right: 20px"
-              v-if="task1Num + task2Num > 0"
             >
               <el-button type="text" size="small" @click="goMyTaskPage"
                 >待办任务</el-button
               >
             </el-badge>
-            <el-badge
-              :value="myMessageLength"
-              :max="99"
-              class="item"
-              v-if="myMessageLength > 0"
-            >
-              <el-button type="text" size="small" @click="goNoticePage"
-                >公告</el-button
-              >
-            </el-badge>
+            <div class="Web_Notice" v-show="socketshow">
+              <div class="workspace_row-grid_mytask" >
+                <div class="workspace_message" v-for="(item, index) in noticedata" :key="index" @click="seeTaskContent(item)">
+                  <div class="workspace_message-title">
+                    标题: {{ item.noticetitle }}
+                  </div>
+                  <div class="workspace_message-date">
+                    时间:{{ item.inserttime }}
+                  </div>
+                  <div class="workspace_message-content">
+                    内容:{{ item.noticecontent }}
+                  </div>
+                  <div class="workspace_message-from">
+                    来自: {{ item.insertusername }}
+                  </div>
+                </div>
+                <div class="workspace_replace_item"></div>
+              </div>
+            </div>
           </div>
           <div class="theme-defined">
             <div
@@ -398,7 +406,7 @@
                 "
                 :style="minHeight"
               ></iframe>
-              
+
             </el-tab-pane>
           </el-tabs>
           <div class="contextmenu">
@@ -640,8 +648,16 @@
         >
       </div>
     </el-dialog>
+
+    <!--通知-->
+<!--    <div class="Web_Notice">
+      <span class="margin_R10">
+        <i class="el-icon-message iconImg"></i>
+        <el-badge :value="taskAllNum" :max="99" :hidden="taskAllNum < 1"></el-badge>
+      </span>
+    </div>-->
   </div>
-</template> 
+</template>
 
 <script>
 import element_css_json_import from "../assets/json/element_css.js";
@@ -883,7 +899,11 @@ export default {
       styleControll: false,
       dutyId: "",
       appId: '',
-      defaultActiveIndex: '' 
+      defaultActiveIndex: '',
+      taskAllNum: '',//任务数目
+      socketshow: false,//通知框的显示
+      orgcodezs: '',//cookie中的orgcode
+      noticedata: [],//通知的数据
     };
   },
   created() {
@@ -899,6 +919,7 @@ export default {
     } else {
       this.styleControll = false;
     }
+    this.getinformation();
   },
   destroyed() {
     // 销毁浏览器返回监听
@@ -911,6 +932,7 @@ export default {
   beforeCreate() {
     let userId = getCookie("userId");
     this.appId = getCookie("appId");
+    this.orgcodezs=getCookie("orgCode");
     let menuId = window.top.localStorage.getItem("activeMenu");
     let companyId = window.top.localStorage.getItem("companyId");
   },
@@ -1065,7 +1087,7 @@ export default {
     var arr = ["#/authManage"];
     if($.inArray(location.hash, arr) == -1){
         //that.getMyToDoDelegateTask();
-        //that.getMyToDoTask();        
+        //that.getMyToDoTask();
     }
 
     that.getMyMessage();
@@ -2447,7 +2469,7 @@ export default {
           if (tree[i].menuId == menuId){
             tree[i]["menuIndex"] = menuIndex;
             return tree[i];
-          } 
+          }
 
             if (
               tree[i].hasOwnProperty("children") &&
@@ -2502,12 +2524,43 @@ export default {
         path: "/",
       });
     },
+    updatecss () {
+      this.socketshow=true;
+      let height = document.body.clientHeight - 125;
+      this.$nextTick(() => {
+        $('.Web_Notice')[0].style.height = height + 'px;'
+      })
+    },
+    leave(){
+      this.socketshow=false;
+    },
+    getinformation(){
+      this.axios.post("/api/v1/ams/getNotice",{orgcodezs:this.orgcodezs}).then((res)=>{
+         this.noticedata=res.data.data;
+         this.taskAllNum=res.data.data[0].taskAllNum
+         console.log(this.noticedata)
+        console.log(this.taskAllNum)
+      })
+    },
+    // 查看待办任务详情
+    seeTaskContent (item) {
+      this.$refs.defaultpage.seeTaskContent(item);
+      // // this.dialogVisible = true;
+      // this.itemTask = item;
+    },
   },
 };
 </script>
 <!-- Add "scoped" attribute to limit CSS to this component only -->
 
 <style lang="less" scoped>
+
+.Web_Notice{
+  width: 300px;
+  position: absolute;
+  left: -100px;
+  background-color: #f1f6fd;
+}
 /deep/ .privilegeArea {
   .el-dialog {
     min-width: 400px;

+ 76 - 2
src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue

@@ -274,6 +274,58 @@
               </div>
             </div>
           </el-tab-pane>
+          <el-tab-pane label="车辆手动进厂" name="sixth">
+            <div class="admin2">
+              <div class="carrier from">
+                <el-form
+                  :inline="true"
+                  class="demo-form-inline"
+                  label-width="80px"
+                >
+                  <el-form-item label="车牌号:">
+                    <el-autocomplete
+                      class="inline-input"
+                      v-model="capacityName"
+                      :fetch-suggestions="querySearchCapacity"
+                      placeholder="车牌号"
+                      :trigger-on-focus="false"
+                      @select="handleSelectCapacity"
+                    >
+                      <template slot-scope="{ item }">
+                        <div class="name">{{ item.capacityNumber }}</div>
+                      </template>
+                    </el-autocomplete>
+                  </el-form-item>
+                </el-form>
+              </div>
+              <div class="poundNo from">
+                <span class="text">运输订单号:</span>
+                <el-input v-model="orderNumber" disabled></el-input>
+              </div>
+              <span class="text">进厂门岗:</span>
+              <el-select
+                v-model="enFactoryGatepost"
+                placeholder="请选择"
+                @change="onchangeGatepost(enFactoryGatepost)"
+              >
+                <el-option
+                  v-for="item in gatePostList"
+                  :key="item.gatepostId"
+                  :label="item.gatepostName"
+                  :value="item.gatepostName"
+                >
+                </el-option>
+              </el-select>
+              <div class="button_box">
+                <el-button
+                  type="primary"
+                  @click="enFactoryResultByPDA"
+                  :disabled="disabled"
+                  >确认</el-button
+                >
+              </div>
+            </div>
+          </el-tab-pane>
         </el-tabs>
       </div>
     </template>
@@ -308,7 +360,10 @@ export default {
       switchValue: true,
       truckCalFirstNum: null,
       truckCalSecondNum: null,
-      lineQuence: null
+      lineQuence: null,
+      gatePostList: [],
+      enFactoryGatepost: null,
+      gatePostId: null
     };
   },
   created() {
@@ -319,10 +374,25 @@ export default {
     this.information();
   },
   methods: {
+    onchangeGatepost(value) {
+      console.log(value);
+      this.gatePostList.forEach(e => {
+        if (e.gatepostName == value) {
+          this.gatePostId = e.gatePostId;
+        }
+      });
+    },
+    enFactoryResultByPDA() {
+      let map = {
+        orderNumber: this.orderNumber + " ",
+        gatepostId: this.gatePostId
+      };
+      this.axios.post("");
+    },
     allowEnfactoryClick() {},
     queueClick() {
       this.axios
-        .post("/api/v1/qms/addQueueResult?vno=" + this.capacityName)
+        .post("/api/v1/qms/addQueueResult?vno=" + this.capacityName + "_")
         .then(res => {
           if (res.data.code == 200) {
             this.$message.success("操作成功");
@@ -431,6 +501,10 @@ export default {
         this.truckCalFirstList = res.data;
         this.truckCalSecondList = res.data;
       });
+      this.axios.get("/api/v1/uc/getAllGatepost").then(res => {
+        console.log(res);
+        this.gatePostList = res.data;
+      });
     },
     onClickConfirm() {
       this.poundNo = "jlbl" + toDateNo(new Date());

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

@@ -15,7 +15,7 @@
       </el-button>
     </div>
     <div class="table">
-      <dilTable 
+      <dilTable
         v-bind.sync="options"
         :isKuang="isKuang"
         @func="func"
@@ -109,7 +109,7 @@ export default {
           }
         })
       }).catch(() => {
-        this.$message.info('已取消删除');       
+        this.$message.info('已取消删除');
       });
     },
     onEnable(scope){
@@ -125,12 +125,12 @@ export default {
           }else{
             this.$message({ type: "error", message: "启用失败,请联系管理员!",});
           }
-          
-        }); 
+
+        });
       }).catch(() => {
-        this.$message.info('已取消启用该油价!');       
+        this.$message.info('已取消启用该油价!');
       });
-        
+
     }
   },
 }

+ 219 - 161
src/views/SporadicManage/components/moreThanMaterialTruck/transportOrder/transportOrder.vue

@@ -10,59 +10,56 @@
         <i class="el-icon-plus"></i>新增
       </el-button>
     </div>
-    <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
-    <dilTable
-          v-bind.sync="truck"
-          @radio-change="currentRadioChange1"
-        ></dilTable>
-    <span slot="footer" class="dialog-footer">
-    <el-button @click="cancelUpdate()">取 消</el-button>
-    <el-button type="primary" @click="updateTruckCapacity()">确 定</el-button>
-    </span>
+    <el-dialog
+      title="车辆信息"
+      :visible.sync="dialogTableVisible"
+      :before-close="handleClose"
+    >
+      <dilTable
+        v-bind.sync="truck"
+        @radio-change="currentRadioChange1"
+      ></dilTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="cancelUpdate()">取 消</el-button>
+        <el-button type="primary" @click="updateTruckCapacity()"
+          >确 定</el-button
+        >
+      </span>
     </el-dialog>
     <div class="transportOrder_bottom">
       <el-tabs v-model="activeName" @tab-click="handleClick">
         <el-tab-pane label="未接收" name="first">
           <dilTable v-bind.sync="first">
-            <el-table-column
-            fixed="right"
-            label="操作"
-            width="100"
-          >
-            <template slot-scope="scope">
-               <el-button @click="updateClick(scope)" type="text" size="small">
-                修改
-              </el-button>
-             <el-button @click="deleteClick(scope)" type="text" size="small">
-                删除
-              </el-button>
-            </template>
-          </el-table-column>
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button @click="updateClick(scope)" type="text" size="small">
+                  修改
+                </el-button>
+                <el-button @click="deleteClick(scope)" type="text" size="small">
+                  删除
+                </el-button>
+              </template>
+            </el-table-column>
           </dilTable>
         </el-tab-pane>
         <!-- 已接收 -->
         <el-tab-pane label="已接收" name="Received">
           <dilTable v-bind.sync="Received">
-            <el-table-column
-            fixed="right"
-            label="操作"
-            width="100"
-          >
-            <template slot-scope="scope">
-              <el-button @click="deleteClick(scope)" type="text" size="small">
-                关闭
-              </el-button>
-            </template>
-          </el-table-column>      
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button @click="deleteClick(scope)" type="text" size="small">
+                  关闭
+                </el-button>
+              </template>
+            </el-table-column>
           </dilTable>
         </el-tab-pane>
-         <!-- 已完成 -->
+        <!-- 已完成 -->
         <el-tab-pane label="已完成" name="completed">
-          <dilTable v-bind.sync="completed">
-          </dilTable>
+          <dilTable v-bind.sync="completed"> </dilTable>
         </el-tab-pane>
       </el-tabs>
-    </div> 
+    </div>
   </div>
 </template>
 
@@ -71,7 +68,7 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
-      carrierUserId:'',
+      carrierUserId: "",
       //模态窗的框计算
       inputText: null,
       //是否弹出对话框
@@ -82,19 +79,20 @@ export default {
       activeName: "first",
       //已下发的表格
       first: {
-        requestUrl:"",
+        requestUrl: ""
       },
-      completed:{
-        requestUrl:"",
+      completed: {
+        requestUrl: ""
       },
       //车辆信息的表格
       truck: {
-        requestUrl: "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + '',
+        requestUrl:
+          "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + "",
         // 控制显示当选列
-        selectionType: "radio",
+        selectionType: "radio"
       },
-      Received:{
-        requestUrl: "",
+      Received: {
+        requestUrl: ""
       },
       //物资信息的数据
       tableData: [],
@@ -103,18 +101,18 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: 200,
+          width: 200
         },
         {
           prop: "materialModel",
           label: "规格型号",
-          width: 200,
+          width: 200
         },
         {
           prop: "weightNum",
           label: "物资数量",
-          width: 200,
-        },
+          width: 200
+        }
       ],
       //当前选中的订单id
       selectOrderId: null,
@@ -122,7 +120,7 @@ export default {
       capacityNumber: "",
       //选中的运力id
       capacityId: null,
-      orderId:null,
+      orderId: null,
       //是否关闭模态框
       drawer: false,
       //模态框从左往右打开
@@ -130,134 +128,195 @@ export default {
       //多选的选中的订单id
       selectionList: [],
       //区别点击的是添加运力,还是修改
-      index: null,
+      index: null
     };
   },
-  created(){
-       if (getCookie("orgCode") == "chengyunshang") {
+  created() {
+    if (getCookie("orgCode") == "chengyunshang") {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId");
-      }else {
+    } else {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-      }
-      if(getCookie('orgCode') == "chengyunshang"){
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" + getCookie("userId") ,
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" + getCookie("userId"),
-        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&carrierId=" + getCookie("userId")
-      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4"
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5"
-        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2"
-      }else{
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&userId=" + getCookie("orgCode")
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&userId=" + getCookie("orgCode")
-        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&userId=" + getCookie("orgCode")
-      }    
+    }
+    if (getCookie("orgCode") == "chengyunshang") {
+      (this.first.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" +
+        getCookie("userId")),
+        (this.Received.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" +
+          getCookie("userId")),
+        (this.completed.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&carrierId=" +
+          getCookie("userId"));
+    } else if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu"
+    ) {
+      this.first.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4";
+      this.Received.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5";
+      this.completed.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2";
+    } else {
+      this.first.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&userId=" +
+        getCookie("orgCode");
+      this.Received.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&userId=" +
+        getCookie("orgCode");
+      this.completed.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&userId=" +
+        getCookie("orgCode");
+    }
   },
-  
+
   methods: {
-    handleClose(done){
-      done()
-      this.$message.info("取消修改运力")
+    handleClose(done) {
+      done();
+      this.$message.info("取消修改运力");
     },
-    cancelUpdate(){
-      this.dialogTableVisible = false
-      this.$message.info("取消修改运力")
+    cancelUpdate() {
+      this.dialogTableVisible = false;
+      this.$message.info("取消修改运力");
     },
-    getRequestUrl(){
-      if(getCookie('orgCode') == "chengyunshang"){
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" + getCookie("userId") + "&test=" + new Date(),
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" + getCookie("userId") + "&test=" + new Date()
-        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&carrierId=" + getCookie("userId") + "&test=" + new Date()
-      
-      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&test=" + new Date()
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&test=" + new Date()
-        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&test=" + new Date()
-      }else{
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&userId=" + getCookie("orgCode") + "&test=" + new Date()
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&userId=" + getCookie("orgCode") + "&test=" + new Date()
-        this.completed.requestUrl =  "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&userId=" + getCookie("orgCode") + "&test=" + new Date()     
+    getRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        (this.first.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&carrierId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date()),
+          (this.Received.requestUrl =
+            "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&carrierId=" +
+            getCookie("userId") +
+            "&test=" +
+            new Date());
+        this.completed.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&carrierId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date();
+      } else if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        this.first.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&test=" +
+          new Date();
+        this.Received.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&test=" +
+          new Date();
+        this.completed.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&test=" +
+          new Date();
+      } else {
+        this.first.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=4&userId=" +
+          getCookie("orgCode") +
+          "&test=" +
+          new Date();
+        this.Received.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=5&userId=" +
+          getCookie("orgCode") +
+          "&test=" +
+          new Date();
+        this.completed.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=3&orderStatus=2&userId=" +
+          getCookie("orgCode") +
+          "&test=" +
+          new Date();
       }
     },
     //删除运输订单
-    deleteClick(scope){
-      this.$confirm('是否删除?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning',
-        }).then(() => {
-            this.axios
-            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
-            .then((res) => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "删除成功!",
-                });     
-                this.getRequestUrl()
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning",
-                });
-              }
-            });
-        }).catch(() => {
+    deleteClick(scope) {
+      let map = {
+        orderId: scope.row.orderId,
+        userId: getCookie("userId")
+      };
+      this.$confirm("是否删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.axios.post("/api/v1/oms/closeOmstruckOrder", map).then(res => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "删除成功!"
+              });
+              this.getRequestUrl();
+            } else {
+              this.$message({
+                message: "删除失败",
+                type: "warning"
+              });
+            }
+          });
+        })
+        .catch(() => {
           this.$message({
-            type: 'info',
-            message: '已取消删除'
-          });          
+            type: "info",
+            message: "已取消删除"
+          });
         });
-      console.log(scope.row.orderId)
+      console.log(scope.row.orderId);
     },
     //修改运输订单
-    updateClick(scope){
-      this.getTruckRequestUrl()
-      this.orderId = scope.row.orderId
-      this.dialogTableVisible = true
-      console.log(scope.row.orderId)
+    updateClick(scope) {
+      this.getTruckRequestUrl();
+      this.orderId = scope.row.orderId;
+      this.dialogTableVisible = true;
+      console.log(scope.row.orderId);
     },
-    updateTruckCapacity(){
-        if(this.capacityId == null){
-            this.$message.error("未选中运力")
-            return
-        }
-        this.axios.post("/api/v1/oms/updateCapacityId",{
-          capacityId:this.capacityId,
-          orderId :this.orderId
-        }).then((res) =>{
-          if(res.data.code == "200"){
-            this.$message.success("修改运力成功")
-            this.getRequestUrl()
-            this.dialogTableVisible = false
-          }else{
-            this.$message.error("修改运力失败")
-          }
+    updateTruckCapacity() {
+      if (this.capacityId == null) {
+        this.$message.error("未选中运力");
+        return;
+      }
+      this.axios
+        .post("/api/v1/oms/updateCapacityId", {
+          capacityId: this.capacityId,
+          orderId: this.orderId
         })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("修改运力成功");
+            this.getRequestUrl();
+            this.dialogTableVisible = false;
+          } else {
+            this.$message.error("修改运力失败");
+          }
+        });
     },
-    getTruckRequestUrl(){
-        if (getCookie("orgCode") == "chengyunshang") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-        getCookie("userId") + "&test=" + new Date();
+    getTruckRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date();
       } else {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null +  "&test=" + new Date();
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&test=" +
+          new Date();
       }
     },
-    currentRadioChange1(row){
-      console.log(row)
-      this.capacityId = row.capacityId
+    currentRadioChange1(row) {
+      console.log(row);
+      this.capacityId = row.capacityId;
     },
-    
-    onclick(){
-      console.log("dianji")
+
+    onclick() {
+      console.log("dianji");
     },
     handleClick(tab, event) {
-      this.getRequestUrl()
+      this.getRequestUrl();
     },
     // 查看物资详情
     detailclick(row) {
@@ -288,21 +347,20 @@ export default {
     materialDetails(orderId) {
       this.axios
         .post("/api/v1/uc/getOrderMaterialMesByOrderId/" + orderId)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             this.tableData = res.data.data;
           }
         });
     },
-    Insert(){
-      this.$router.push("addMornThanTransportOrder")
+    Insert() {
+      this.$router.push("addMornThanTransportOrder");
     }
-  },
+  }
 };
 </script>
 
 <style lang="scss">
-
 .transportOrder {
   .transportOrder_top {
     width: 100%;
@@ -310,9 +368,9 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .el-input{
-  width: 20%;
-}
+    .el-input {
+      width: 20%;
+    }
   }
   .drawer_top {
     width: 100%;
@@ -322,4 +380,4 @@ export default {
     align-items: center;
   }
 }
-</style>
+</style>

+ 18 - 16
src/views/SporadicManage/components/oldAreaSporadic/transportOrder/transportOrder.vue

@@ -639,28 +639,30 @@ export default {
     },
     //删除运输订单
     deleteClick(scope) {
+      let map = {
+        orderId: scope.row.orderId,
+        userId: getCookie("userId")
+      };
       this.$confirm("是否删除?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning"
       })
         .then(() => {
-          this.axios
-            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
-            .then(res => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "删除成功!"
-                });
-                this.getRequestUrl();
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning"
-                });
-              }
-            });
+          this.axios.post("/api/v1/oms/closeOmstruckOrder", map).then(res => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "删除成功!"
+              });
+              this.getRequestUrl();
+            } else {
+              this.$message({
+                message: "删除失败",
+                type: "warning"
+              });
+            }
+          });
         })
         .catch(() => {
           this.$message({

+ 261 - 184
src/views/SporadicManage/components/sporadicMaterial/transportOrder/transportOrder.vue

@@ -10,76 +10,69 @@
         <i class="el-icon-plus"></i>新增
       </el-button>
     </div>
-    <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
-    <dilTable
-          v-bind.sync="truck"
-          @radio-change="currentRadioChange1"
-        ></dilTable>
-    <span slot="footer" class="dialog-footer">
-    <el-button @click="dialogTableVisible = false">取 消</el-button>
-    <el-button type="primary" @click="updateTruckCapacity()">确 定</el-button>
-    </span>
+    <el-dialog
+      title="车辆信息"
+      :visible.sync="dialogTableVisible"
+      :before-close="handleClose"
+    >
+      <dilTable
+        v-bind.sync="truck"
+        @radio-change="currentRadioChange1"
+      ></dilTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogTableVisible = false">取 消</el-button>
+        <el-button type="primary" @click="updateTruckCapacity()"
+          >确 定</el-button
+        >
+      </span>
     </el-dialog>
     <div class="transportOrder_bottom">
       <el-tabs v-model="activeName" @tab-click="handleClick">
         <!-- 已下发 -->
         <el-tab-pane label="未接收" name="first">
           <dilTable v-bind.sync="first">
-            <el-table-column
-            fixed="right"
-            label="操作"
-            width="100"
-          >
-            <template slot-scope="scope">
-               <el-button @click="updateClick(scope)" type="text" size="small">
-                修改
-              </el-button>
-             <el-button @click="deleteClick(scope)" type="text" size="small">
-                删除
-              </el-button>
-            </template>
-          </el-table-column>
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button @click="updateClick(scope)" type="text" size="small">
+                  修改
+                </el-button>
+                <el-button @click="deleteClick(scope)" type="text" size="small">
+                  删除
+                </el-button>
+              </template>
+            </el-table-column>
           </dilTable>
         </el-tab-pane>
         <!-- 已接收 -->
         <el-tab-pane label="已接收" name="Received">
           <dilTable v-bind.sync="Received">
-            <el-table-column
-            fixed="right"
-            label="操作"
-            width="100"
-          >
-            <template slot-scope="scope">
-              <el-button @click="deleteClick(scope)" type="text" size="small">
-                关闭
-              </el-button>
-            </template>
-          </el-table-column>
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button @click="deleteClick(scope)" type="text" size="small">
+                  关闭
+                </el-button>
+              </template>
+            </el-table-column>
           </dilTable>
         </el-tab-pane>
-         <!-- 已完成 -->
+        <!-- 已完成 -->
         <el-tab-pane label="已完成" name="completed">
-          <dilTable v-bind.sync="completed">
-          </dilTable>
+          <dilTable v-bind.sync="completed"> </dilTable>
         </el-tab-pane>
-         <!-- 已拒绝 -->
+        <!-- 已拒绝 -->
         <el-tab-pane label="已拒绝" name="refused">
           <dilTable v-bind.sync="refused">
-            <el-table-column
-            fixed="right"
-            label="操作"
-            width="100"
-          >
-            <template slot-scope="scope">
-              <el-button @click="ctrlZClick(scope)" type="text" size="small">
-                撤销
-              </el-button>
-            </template>
-          </el-table-column>
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button @click="ctrlZClick(scope)" type="text" size="small">
+                  撤销
+                </el-button>
+              </template>
+            </el-table-column>
           </dilTable>
         </el-tab-pane>
       </el-tabs>
-    </div> 
+    </div>
   </div>
 </template>
 
@@ -88,7 +81,7 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
-      carrierUserId:'',
+      carrierUserId: "",
       //模态窗的框计算
       inputText: null,
       //是否弹出对话框
@@ -99,27 +92,27 @@ export default {
       activeName: "first",
       //已下发的表格
       first: {
-        requestUrl:"",
+        requestUrl: ""
       },
       //车辆信息的表格
       truck: {
-        requestUrl: "" ,
+        requestUrl: "",
         // 控制显示当选列
-        selectionType: "radio",
+        selectionType: "radio"
       },
-      Received:{
-        requestUrl: "",
+      Received: {
+        requestUrl: ""
       },
-      completed:{
-        requestUrl:"",
+      completed: {
+        requestUrl: ""
       },
-      refused:{
-        requestUrl:"",
+      refused: {
+        requestUrl: ""
       },
-       //车辆的表格
+      //车辆的表格
       truck: {
         requestUrl: "",
-        selectionType: "radio",
+        selectionType: "radio"
       },
       //物资信息的数据
       tableData: [],
@@ -128,18 +121,18 @@ export default {
         {
           prop: "materialName",
           label: "物资名称",
-          width: 200,
+          width: 200
         },
         {
           prop: "materialModel",
           label: "规格型号",
-          width: 200,
+          width: 200
         },
         {
           prop: "weightNum",
           label: "物资数量",
-          width: 200,
-        },
+          width: 200
+        }
       ],
       //当前选中的订单id
       selectOrderId: null,
@@ -152,145 +145,230 @@ export default {
       //模态框从左往右打开
       direction: "rtl",
 
-      orderId:null,
+      orderId: null,
       //多选的选中的订单id
       selectionList: [],
       //区别点击的是添加运力,还是修改
-      index: null,
+      index: null
     };
   },
-  created(){
-      if (getCookie("orgCode") == "chengyunshang") {
+  created() {
+    if (getCookie("orgCode") == "chengyunshang") {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId");
-      } else {
+    } else {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-      }
-      if(getCookie('orgCode') == "chengyunshang"){
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + getCookie("userId") ,
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + getCookie("userId"),
-        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&carrierId=" + getCookie("userId"),
-        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&carrierId=" + getCookie("userId")
-      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "wuliuchuyunzhongxin"){
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4"
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5"
-        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2"
-        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6"
-      }else{
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&userId=" + getCookie("orgCode")
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&userId=" + getCookie("orgCode")
-        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&userId=" + getCookie("orgCode")
-        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&userId=" + getCookie("orgCode")
-      }
+    }
+    if (getCookie("orgCode") == "chengyunshang") {
+      (this.first.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" +
+        getCookie("userId")),
+        (this.Received.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" +
+          getCookie("userId")),
+        (this.completed.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&carrierId=" +
+          getCookie("userId")),
+        (this.refused.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&carrierId=" +
+          getCookie("userId"));
+    } else if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu" ||
+      getCookie("orgCode") == "wuliuchuyunzhongxin"
+    ) {
+      this.first.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4";
+      this.Received.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5";
+      this.completed.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2";
+      this.refused.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6";
+    } else {
+      this.first.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&userId=" +
+        getCookie("orgCode");
+      this.Received.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&userId=" +
+        getCookie("orgCode");
+      this.completed.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&userId=" +
+        getCookie("orgCode");
+      this.refused.requestUrl =
+        "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&userId=" +
+        getCookie("orgCode");
+    }
   },
   methods: {
     //撤销已拒绝的运输订单
-    ctrlZClick(scope){
-        console.log(scope.row.orderId)
-        this.axios.post("/api/v1/oms/refuseCtrlZ",{
-          orderId:scope.row.orderId
-        }).then((res) => {
-          if(res.data.code == '200'){
-             this.$message.success("撤单成功")
-             this.getRequestUrl()
-          }
+    ctrlZClick(scope) {
+      console.log(scope.row.orderId);
+      this.axios
+        .post("/api/v1/oms/refuseCtrlZ", {
+          orderId: scope.row.orderId
         })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("撤单成功");
+            this.getRequestUrl();
+          }
+        });
     },
-    handleClose(done){
-      done()
-      this.$message.info("取消修改运力")
+    handleClose(done) {
+      done();
+      this.$message.info("取消修改运力");
     },
-    getRequestUrl(){
-        if(getCookie('orgCode') == "chengyunshang"){
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" + getCookie("userId") + "&test=" + new Date() ,
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" + getCookie("userId") + "&test=" + new Date()
-        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&carrierId=" + getCookie("userId") + "&test=" + new Date()
-        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&carrierId=" + getCookie("userId") + "&test=" + new Date()
-      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu" || getCookie("orgCode") == "wuliuchuyunzhongxin"){
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4" + "&test=" + new Date()
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5" + "&test=" + new Date()
-        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2" + "&test=" + new Date()
-        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6" + "&test=" + new Date()
-      }else{
-        this.first.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&userId=" + getCookie("orgCode") + "&test=" + new Date()
-        this.Received.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&userId=" + getCookie("orgCode") + "&test=" + new Date()
-        this.completed.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&userId=" + getCookie("orgCode") + "&test=" + new Date()
-        this.refused.requestUrl = "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&userId=" + getCookie("orgCode") + "&test=" + new Date()
+    getRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        (this.first.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&carrierId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date()),
+          (this.Received.requestUrl =
+            "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&carrierId=" +
+            getCookie("userId") +
+            "&test=" +
+            new Date());
+        this.completed.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&carrierId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date();
+        this.refused.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&carrierId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date();
+      } else if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        this.first.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4" +
+          "&test=" +
+          new Date();
+        this.Received.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5" +
+          "&test=" +
+          new Date();
+        this.completed.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2" +
+          "&test=" +
+          new Date();
+        this.refused.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6" +
+          "&test=" +
+          new Date();
+      } else {
+        this.first.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=4&userId=" +
+          getCookie("orgCode") +
+          "&test=" +
+          new Date();
+        this.Received.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=5&userId=" +
+          getCookie("orgCode") +
+          "&test=" +
+          new Date();
+        this.completed.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=2&userId=" +
+          getCookie("orgCode") +
+          "&test=" +
+          new Date();
+        this.refused.requestUrl =
+          "/api/v1/oms/getOthersOrderMesToSend?apiId=386&type=1&orderStatus=6&userId=" +
+          getCookie("orgCode") +
+          "&test=" +
+          new Date();
       }
     },
-    getTruckRequestUrl(){
-        if (getCookie("orgCode") == "chengyunshang") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-        getCookie("userId") + "&test=" + new Date();
+    getTruckRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date();
       } else {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null +  "&test=" + new Date();
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&test=" +
+          new Date();
       }
     },
-    currentRadioChange1(row){
-      console.log(row)
-      this.capacityId = row.capacityId
+    currentRadioChange1(row) {
+      console.log(row);
+      this.capacityId = row.capacityId;
     },
-     //删除运输订单
-    deleteClick(scope){
-      this.$confirm('是否删除?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning',
-        }).then(() => {
-            this.axios
-            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
-            .then((res) => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "删除成功!",
-                });     
-                this.getRequestUrl()
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning",
-                });
-              }
-            });
-        }).catch(() => {
+    //删除运输订单
+    deleteClick(scope) {
+      let map = {
+        orderId: scope.row.orderId,
+        userId: getCookie("userId")
+      };
+      this.$confirm("是否删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.axios.post("/api/v1/oms/closeOmstruckOrder", map).then(res => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "删除成功!"
+              });
+              this.getRequestUrl();
+            } else {
+              this.$message({
+                message: "删除失败",
+                type: "warning"
+              });
+            }
+          });
+        })
+        .catch(() => {
           this.$message({
-            type: 'info',
-            message: '已取消删除'
-          });          
+            type: "info",
+            message: "已取消删除"
+          });
         });
     },
     //修改运输订单
-    updateClick(scope){
-      this.getTruckRequestUrl()
-      this.orderId = scope.row.orderId
-      this.dialogTableVisible = true
-      console.log(scope.row.orderId)
+    updateClick(scope) {
+      this.getTruckRequestUrl();
+      this.orderId = scope.row.orderId;
+      this.dialogTableVisible = true;
+      console.log(scope.row.orderId);
     },
-    updateTruckCapacity(){
-        if(this.capacityId == null){
-            this.$message.error("未选中运力")
-            return
-        }
-        this.axios.post("/api/v1/oms/updateCapacityId",{
-          capacityId:this.capacityId,
-          orderId :this.orderId
-        }).then((res) =>{
-          if(res.data.code == "200"){
-            this.$message.success("修改运力成功")
-            this.getRequestUrl()
-            this.dialogTableVisible = false
-          }else{
-            this.$message.error("修改运力失败")
-          }
+    updateTruckCapacity() {
+      if (this.capacityId == null) {
+        this.$message.error("未选中运力");
+        return;
+      }
+      this.axios
+        .post("/api/v1/oms/updateCapacityId", {
+          capacityId: this.capacityId,
+          orderId: this.orderId
         })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("修改运力成功");
+            this.getRequestUrl();
+            this.dialogTableVisible = false;
+          } else {
+            this.$message.error("修改运力失败");
+          }
+        });
     },
     handleClick(tab, event) {
-      this.getRequestUrl()
+      this.getRequestUrl();
     },
     // 查看物资详情
     detailclick(row) {
@@ -321,21 +399,20 @@ export default {
     materialDetails(orderId) {
       this.axios
         .post("/api/v1/uc/getOrderMaterialMesByOrderId/" + orderId)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             this.tableData = res.data.data;
           }
         });
     },
-    Insert(){
-      this.$router.push("addSporadicTransportOrder")
+    Insert() {
+      this.$router.push("addSporadicTransportOrder");
     }
-  },
+  }
 };
 </script>
 
 <style lang="scss">
-
 .transportOrder {
   .transportOrder_top {
     width: 100%;
@@ -343,9 +420,9 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .el-input{
-  width: 20%;
-}
+    .el-input {
+      width: 20%;
+    }
   }
   .drawer_top {
     width: 100%;
@@ -355,4 +432,4 @@ export default {
     align-items: center;
   }
 }
-</style>
+</style>

+ 1 - 3
src/views/TMS/components/bmsship/addTwoSectionHandleFee.vue

@@ -12,8 +12,7 @@
         </div>
         <div class="searchSelect">
             <span class="text">单价</span>
-            <el-input class="input" v-model="form.unitPrice" disabled  @change="calculate"> </el-input>
-            <el-button class="button" type="primary" @click="ondrawer(6)">浏览</el-button>
+            <el-input class="input" v-model="form.unitPrice"   @change="calculate"> </el-input>
         </div>
         <div class="preview-group">
           <el-form-item label="实装吨位">
@@ -205,7 +204,6 @@ export default {
       if(map.batchId==null ||
        map.purchaseOrderId==null ||
        map.unitPrice==null ||
-       map.unitPriceId==null ||
        map.realTonnage==null ||
        map.fee==null ||
        map.makeTime==null ||

+ 214 - 77
src/views/TMS/components/bmsship/detailsStatement.vue

@@ -2,18 +2,36 @@
 <template>
   <div id="detailsStatement">
     <div class="top">
-      <el-form inline="true">
+      <el-form :inline="true">
         <el-form-item>
           <el-input v-model="shipName" placeholder="请输入船名"></el-input>
         </el-form-item>
         <el-form-item>
           <span class="demonstration">结算日期</span>
-          <el-date-picker v-model="value1" type="date" placeholder="选择日期">
+          <el-date-picker
+            v-model="startTime"
+            type="date"
+            placeholder="选择日期"
+            style="width:200px"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="date"
+            placeholder="选择日期"
+            style="width:200px"
+          >
           </el-date-picker>
         </el-form-item>
         <el-form-item>
           <el-button @click="onClick">查询</el-button>
         </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="exportAllReportToExcel"
+            ><i class="el-icon-download"></i>Excel</el-button
+          >
+        </el-form-item>
         <el-form-item>
           <span class="totalWillTonage">合计已预开票吨位</span>
           <el-input
@@ -57,12 +75,11 @@
             border
             stripe
             style="width: 100%; margin-top: 20px"
-            max-height="800px"
+            max-height="600px"
             :row-style="{ height: '30px' }"
             :cell-style="{ fontWeight: '700' }"
-            :summary-method="getSummaries"
-            show-summary
             class="table"
+            :span-method="objectSpanMethod"
           >
             <el-table-column
               prop="index"
@@ -74,122 +91,138 @@
               <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
             </el-table-column>
             <el-table-column
-              prop="materialTypeName"
+              prop="materialName"
               label="品种"
-              width="200px"
+              width="150px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="shipName"
+              prop="resultForeignShipName"
               label="船名"
-              width="200px"
+              width="150px"
               align="center"
             >
             </el-table-column>
             <el-table-column
               prop="portName"
               label="放货港口"
-              width="200px"
+              width="150px"
               align="center"
             >
             </el-table-column>
             <el-table-column
               prop="carrierName"
               label="承运单位"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="leavePortDate"
+              prop="resultOutPortTime"
               label="离港日期"
               width="200px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="loadShipTon"
+              prop="loadTonnage"
               label="装船吨位"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="loadShipPer"
+              prop="loadingProportion"
               label="装船比例"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="billTon"
+              prop="realTonnage"
               label="结算吨位"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="enFatoryTon"
+              prop="totalEnTonnage"
               label="到厂湿吨"
-              width="200px"
+              width="100px"
               align="center"
             >
               <template slot-scope="scope">
-                <el-input v-model="scope.row.enFatoryTon"></el-input>
+                <el-input v-model="scope.row.totalEnTonnage"></el-input>
               </template>
             </el-table-column>
             <el-table-column
-              prop="contractPrice"
+              prop="unitPrice"
               label="合同单价"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="statementAmount"
+              prop="fee"
               label="金额(元)"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="willTonanged"
+              prop="previewTonnage"
               label="已预开票吨位"
-              width="200px"
+              width="100px"
               align="center"
             >
               <template slot-scope="scope">
-                <el-input v-model="scope.row.willTonanged"></el-input>
+                <el-input v-model="scope.row.previewTonnage"></el-input>
               </template>
             </el-table-column>
             <el-table-column
-              prop="willMoneyed"
+              prop="previewFee"
               label="已预开票金额"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="actuallyMoney"
+              prop="makeTonnage"
               label="本次实际开票吨位"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
               prop="actuallyMoney"
-              label="本次实际开票吨位"
-              width="200px"
+              label="本次实际开票金额"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="actuallyMonthMoney"
+              prop="feeMake"
               label="本月实际开票金额"
-              width="200px"
+              width="100px"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="operate"
+              label="操作"
+              width="100px"
               align="center"
+              fixed="right"
             >
+              <template slot-scope="scope">
+                <el-button type="text" @click="operate(scope.row)"
+                  >保存</el-button
+                >
+                <el-button type="text" @click="settlement(scope.row)"
+                  >结算</el-button
+                >
+              </template>
             </el-table-column>
           </el-table>
         </el-tab-pane>
@@ -199,13 +232,11 @@
             ref="tableRef1"
             border
             stripe
-            style="width: 100%; margin-top: 20px"
-            max-height="800px"
+            max-height="600px"
             :row-style="{ height: '30px' }"
             :cell-style="{ fontWeight: '700' }"
-            :summary-method="getSummaries"
-            show-summary
             class="table"
+            :span-method="objectSpanMethod1"
           >
             <el-table-column
               prop="index"
@@ -217,89 +248,89 @@
               <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
             </el-table-column>
             <el-table-column
-              prop="materialTypeName"
+              prop="materialName"
               label="品种"
-              width="200px"
+              width="150px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="shipName"
+              prop="resultForeignShipName"
               label="船名"
-              width="200px"
+              width="150px"
               align="center"
             >
             </el-table-column>
             <el-table-column
               prop="portName"
               label="放货港口"
-              width="200px"
+              width="150px"
               align="center"
             >
             </el-table-column>
             <el-table-column
               prop="carrierName"
               label="承运单位"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="leavePortDate"
+              prop="resultOutPortTime"
               label="离港日期"
               width="200px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="loadShipTon"
+              prop="loadTonnage"
               label="装船吨位"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="loadShipPer"
+              prop="loadingProportion"
               label="装船比例"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="billTon"
+              prop="realTonnage"
               label="结算吨位"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="enFatoryTon"
+              prop="totalEnTonnage"
               label="到厂湿吨"
-              width="200px"
+              width="100px"
               align="center"
             >
               <template slot-scope="scope">
-                <el-input v-model="scope.row.enFatoryTon"></el-input>
+                <el-input v-model="scope.row.totalEnTonnage"></el-input>
               </template>
             </el-table-column>
             <el-table-column
-              prop="contractPrice"
+              prop="unitPrice"
               label="合同单价"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="statementAmount"
+              prop="fee"
               label="金额(元)"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="willTonanged"
+              prop="previewTonnage"
               label="已预开票吨位"
-              width="200px"
+              width="100px"
               align="center"
             >
               <template slot-scope="scope">
@@ -307,30 +338,30 @@
               </template>
             </el-table-column>
             <el-table-column
-              prop="willMoneyed"
+              prop="previewFee"
               label="已预开票金额"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="actuallyMoney"
+              prop="makeTonnage"
               label="本次实际开票吨位"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
               prop="actuallyMoney"
-              label="本次实际开票吨位"
-              width="200px"
+              label="本次实际开票金额"
+              width="100px"
               align="center"
             >
             </el-table-column>
             <el-table-column
-              prop="actuallyMonthMoney"
+              prop="feeMake"
               label="本月实际开票金额"
-              width="200px"
+              width="100px"
               align="center"
             >
             </el-table-column>
@@ -341,6 +372,7 @@
   </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
@@ -349,21 +381,98 @@ export default {
       totalActuallyTonageedMoney: 0,
       totalActuallyTonageedValue: 0,
       shipName: null,
-      tableData: null,
+      tableData: [],
+      tableData1: [],
       spanArr: [],
+      spanArr1: [],
+      pos: null,
       mergeList: [
         "index",
         "carrierName",
         "portName",
-        "shipName",
-        "materialTypeName",
-        "enFatoryTon"
+        "resultForeignShipName",
+        "materialName",
+        "totalEnTonnage",
+        "operate"
       ],
       activeName: "first",
-      tableTitle: "结算账单报表"
+      tableTitle: "结算账单报表",
+      startTime: null,
+      endTime: null
     };
   },
+  watch: {
+    tableData: {
+      handler(newVal) {
+        console.log("执行一次汇总函数");
+        this.computedTableData(newVal);
+      },
+      deep: true,
+      immediate: false
+    },
+    tableData1: {
+      handler(newVal) {
+        console.log("执行一次汇总函数");
+        this.computedTableData(newVal);
+      },
+      deep: true,
+      immediate: false
+    }
+  },
   methods: {
+    //结算
+    settlement(row) {},
+    //保存
+    operate(row) {
+      console.log(row);
+      //遍历tableData,找出相同批次的行数
+      let arr = this.tableData.filter(e => {
+        return e.batchId == row.batchId;
+      });
+      let stateMentTotalAmount = this.tableData.reduce((pre, item) => {
+        return pre + item.fee;
+      }, 0);
+      let map = {
+        list: arr,
+        statementType: 3,
+        totalEnTonnage: row.totalEnTonnage,
+        stateMentTotalAmount: stateMentTotalAmount,
+        userID: getCookie("userId")
+      };
+      this.axios
+        .post("/api/v1/bms/addShipFeeStatement", map)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.getNoDetailsStament();
+            this.$message.success("保存成功");
+          }
+        })
+        .catch(() => {
+          this.$message.error("保存失败");
+        });
+    },
+    //处理表格数据
+    computedTableData(data) {
+      data.forEach((item, index) => {
+        if (index == 0) {
+        } else if (item.batchId == data[index - 1].batchId) {
+          item.totalEnTonnage = data[index - 1].totalEnTonnage;
+        }
+        //预开金额
+        item.previewFee = (item.unitPrice * item.previewTonnage).toFixed(2);
+        //金额
+        item.fee = (item.realTonnage * item.unitPrice).toFixed(2);
+        //结算吨位
+        item.realTonnage = (
+          item.totalEnTonnage * item.loadingProportion
+        ).toFixed(2);
+        //开票吨位
+        item.makeTonnage = (item.realTonnage - item.previewTonnage).toFixed(2);
+        //实际开票金额
+        item.actuallyMoney = (item.makeTonnage * item.unitPrice).toFixed(2);
+      });
+      this.getSpanArr(this.tableData);
+    },
     //根据表格据汇总顶部展示
     getTotalArr(data) {
       this.totalWillTonageedValue = data.reduce((pre, item) => {
@@ -379,9 +488,18 @@ export default {
         return pre + item.actuallyMonthMoney;
       });
     },
+    handleClick() {
+      console.log("我正在进行账单");
+    },
     onClick() {},
     //获取未结算账单数据
-    getNoDetailsStament() {},
+    getNoDetailsStament() {
+      this.axios.post("/api/v1/bms/getShipFeeStatement").then(res => {
+        console.log(res.data.data);
+        this.tableData = res.data.data;
+        this.computedTableData(this.tableData);
+      });
+    },
     getDetailsStamented() {},
     //合并表格数据
     getSpanArr(data) {
@@ -394,7 +512,7 @@ export default {
           this.pos = 0;
         } else {
           // 判断当前元素与上一个元素是否相同
-          if (data[i].saleOrderId === data[i - 1].saleOrderId) {
+          if (data[i].batchId === data[i - 1].batchId) {
             this.spanArr[this.pos] += 1;
             data[i].group = data[i - 1].group;
             this.spanArr.push(0);
@@ -416,6 +534,16 @@ export default {
         };
       }
     },
+    objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeList.includes(column.property)) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
     //导出账单数据
     exportAllReportToExcel() {
       console.log(this.$refs.tableRef);
@@ -467,5 +595,14 @@ export default {
     margin-left: 10px;
     margin-top: 30px;
   }
+  .main {
+    margin-left: 10px;
+    margin-top: 30px;
+    ::-webkit-scrollbar {
+      // width: 20px;
+      height: 20px;
+      background-color: transparent;
+    }
+  }
 }
 </style>

+ 18 - 9
src/views/TMS/components/bmsship/threeSectionFeeDetails.vue

@@ -9,10 +9,10 @@
         clearable
       >
       </el-input>
-<!-- 
+
        <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-date-picker v-model="endTime" type="datetime" placeholder="选择日期"></el-date-picker>
 
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
@@ -48,16 +48,25 @@ export default {
       startTime: null,
       endTime: null,
       input: "",
-       startTime: null,
-      endTime: null,
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getLoadShipList?apiId=63",
+        requestUrl: "/api/v1/tms/getLoadShipList?apiId=512",
       },
     };
   },
-  mounted() {},
+  mounted() {
+    this.initDate();
+    this.onclick();
+  },
   methods: {
+    initDate(){
+      this.startTime=new Date();
+      this.endTime=new Date();
+      this.startTime.setDate(1);
+      this.startTime.setHours(0);
+      this.startTime.setMinutes(0);
+      this.startTime.setSeconds(0);
+    },
     onclick() {
       let startTime = null;
       let endTime = null;
@@ -68,13 +77,13 @@ export default {
         endTime = sjTime(this.endTime);
       }
       if(startTime && endTime && startTime < endTime){
-          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input+
+          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=512&con=" + this.input+
                 "&startTime=" +
                 startTime +
                 "&endTime=" +
                 endTime;
       }else{
-          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=63&con=" + this.input;
+          this.option.requestUrl = "/api/v1/tms/getLoadShipList?apiId=512&con=" + this.input;
       }
     },
     click(resultId) {
@@ -99,7 +108,7 @@ export default {
               message: "删除成功!",
             });
             this.option.requestUrl =
-              "/api/v1/tms/getLoadShipList?apiId=63&i=" + new Date();
+              "/api/v1/tms/getLoadShipList?apiId=512&i=" + new Date();
           });
         })
         .catch(() => {

+ 6 - 6
src/views/TMS/components/bmsship/updateThreeSectionFeeDetails.vue

@@ -17,7 +17,7 @@
           <el-form-item label="水分检测费">
              <el-input type="number" placeholder="水分检测费" v-model="form1.resultInspectionFees"></el-input>
           </el-form-item>
-          <el-form-item label="计划日期">
+          <!-- <el-form-item label="计划日期">
             <el-date-picker
             v-model="form1.planDate"
             type="datetime"
@@ -30,8 +30,8 @@
             type="datetime"
             placeholder="预计放货日期">
             </el-date-picker>
-          </el-form-item>
-          <el-form-item label="含水率">
+          </el-form-item> -->
+          <el-form-item label="含水率(%)">
              <el-input type="number" placeholder="含水率" v-model="form1.resultMoistureContent"
              @change="pipeiContarct"></el-input>
           </el-form-item>
@@ -164,7 +164,7 @@ export default {
       ) {
         let map = {
           batchInfactoryId: this.form1.batchId,
-          resultMoistureContent: this.form1.resultMoistureContent,
+          resultMoistureContent: this.form1.resultMoistureContent/100,
           resultActualInstallations:this.form1.resultActualInstallations,
         };
         this.axios
@@ -200,8 +200,8 @@ export default {
         ),
         resultIsClear: this.form1.resultIsClear,
         resultOutPortName:this.form1.resultOutPortName,
-        planDate:sjTime(this.form1.planDate),
-        planDeliveryDate:sjTime(this.form1.planDeliveryDate),
+        // planDate:sjTime(this.form1.planDate),
+        // planDeliveryDate:sjTime(this.form1.planDeliveryDate),
         isNeedAssemble:this.form1.isNeedAssemble,
         resultInspectionFees:this.form1.resultInspectionFees,
         moistureTonnage:this.form1.moistureTonnage,

+ 1 - 1
src/views/TMS/components/bmstruck/detailsTruckOrder.vue

@@ -57,4 +57,4 @@ export default {
     padding: 1.25rem 1.875rem;
   }
 }
-</style>
+</style>

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

@@ -1,6 +1,6 @@
 <template>
   <!-- 国产矿导入3-->
-  <div class="addWagonLoad">
+  <div class="addWagonLoad" style="width:100%">
     <page-title>返回</page-title>
     <div class="cp">
       <el-upload
@@ -18,11 +18,12 @@
         当前导入数量:{{ tableData.length }}
       </div>
     </div>
-    <div class="importedTable" style="height:300px;overflow:scroll;">
+    <div class="importedTable" style="height:300px;overflow:scroll;width:100%">
       <el-table
         ref="importExcel"
         highlight-current-row
         :data="tableData"
+        fit
         :row-style="{height:'40px'}"
          @row-click="rowClick"
          style="width: 100%;font-size: 14px"
@@ -59,7 +60,7 @@
           align="center"
           prop="supplierName"
           label="发货单位"
-          width="150px"
+          width="300px"
         >
         </el-table-column>
         <el-table-column
@@ -106,7 +107,6 @@
         </el-table-column>
         <el-table-column
           align="center"
-          width="100px"
           prop="weight"
           label="标重"
         >
@@ -132,7 +132,6 @@
           <div class="preview-group">
             <el-form-item label="到站:">
               <el-autocomplete
-                class="inline-input"
                 v-model="toTheStation"
                 :fetch-suggestions="querySearchToTheStation"
                 placeholder="请输入到站名称"

+ 3 - 3
src/views/TMS/components/importedEmergency/wagonLoadEmergency.vue

@@ -55,7 +55,7 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=2",
+        requestUrl: "/api/v1/tms/getTmstrainWagonLoad?apiId=508&resultType=2",
       },
     };
   },
@@ -73,7 +73,7 @@ export default {
         if (startTime && endTime) {
           if (startTime < endTime) {
              this.option.requestUrl =
-            "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=2&con=" +
+            "/api/v1/tms/getTmstrainWagonLoad?apiId=508&resultType=2&con=" +
             this.input + "&startTime=" +
               startTime +
               "&endTime=" +
@@ -83,7 +83,7 @@ export default {
           }
         } else {
           this.option.requestUrl =
-            "/api/v1/tms/getTmstrainWagonLoad?apiId=209&resultType=2&con=" +
+            "/api/v1/tms/getTmstrainWagonLoad?apiId=508&resultType=2&con=" +
             this.input;
         }
       } else if (num == 1) {

+ 44 - 95
src/views/TMS/components/importedMine/addWagonLoad.vue

@@ -2,36 +2,22 @@
   <!-- 万州港-达州新增装车1 -->
   <div class="addWagonLoad">
     <page-title>返回</page-title>
-    <!-- <div class="cp">
-      <span >车皮号:</span>
-      <el-upload style="margin: 8px;"
-          class="upload-excel"
-          action=""
-          :on-change="importExcel"
-          :show-file-list="false"
-          accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
-          :auto-upload="false">
-          <el-button  type="primary">导入</el-button>
-      </el-upload>
-      <span >当前导入数量:{{tableData.length}}</span>
-    </div> -->
     <div class="tempTable">
       <div class="search" style="display:flex;margin: 10px;">
         <el-input
-          placeholder="请输入"
-         value="请先导入查询,再勾选,如果查询失败,可能是港口没有出库或者已经装车"
+          placeholder="请输入车皮号或外轮船名"
+          v-model="input"
           style="margin: 10px; width:38%"
           clearable
-          disabled
         ></el-input>
-        <!-- <el-button
+        <el-button
           type="primary"
           class="btn"
-          @click="searchLoadTemp()"
+          @click="findWagon()"
           style="margin: 10px;"
         >
           <i class="el-icon-search"></i>查询
-        </el-button> -->
+        </el-button>
          <el-upload style="margin: 10px;"
           class="upload-excel"
           action=""
@@ -102,66 +88,6 @@
         </el-table>
       </div>
     </div>
-    <!-- <div class="importedTable" style="height:300px;overflow:scroll;">
-      <el-table
-        highlight-current-row
-        :data="tableData"
-        :row-style="{height:'40px'}"
-        style="width: 100%,font-size: 20px"
-        id="domesticTable">
-        <el-table-column
-        type="index"
-        width="50"
-        prop="number"
-        label="序号"
-        align="center"
-        fixed="left"
-        :resizable="false">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="productName"
-          label="品  名"
-          width="240px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="mineral"
-          label="矿种"
-          width="100px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="wagonNo"
-          label="车号"
-          width="180px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="unloadPoint"
-          label="卸货地点"
-          width="180px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-          prop="sendStation"
-          label="发站"
-          width="180px">
-        </el-table-column>
-        <el-table-column
-        align="center"
-        width="180px"
-          prop="arrivalStation"
-          label="到站">
-        </el-table-column>
-         <el-table-column
-         align="center"
-        width="180px"
-          prop="weight"
-          label="标重">
-        </el-table-column>
-      </el-table>
-    </div> -->
     <div class="right" 
     style="margin-top:10px
            float:right;">
@@ -188,18 +114,6 @@
                     <el-select filterable  v-model="arrivalStationId">
                         <el-option v-for="item in arrivalStations" :value="item.arrivalId" :key="item.arrivalId" :label="item.arrivalName"></el-option>
                     </el-select>
-                    <!-- <el-autocomplete
-                      class="inline-input"
-                      v-model="toTheStation"
-                      :fetch-suggestions="querySearchToTheStation"
-                      placeholder="请输入到站名称"
-                      :trigger-on-focus="false"
-                      @select="handleSelectToTheStation"
-                    >
-                      <template slot-scope="{ item }">
-                        <div class="name">{{ item.arrivalName }}</div>
-                      </template>
-                    </el-autocomplete> -->
                   </el-form-item>
                </div>
           </el-form>
@@ -208,7 +122,7 @@
         </div>
         <div class="button-box">
           <el-button @click="cancel">取消</el-button>
-          <el-button type="primary" :loading="isLoading" @click="makeSure">确定</el-button>
+          <el-button type="primary" :loading="isLoading" :disabled="!isSend" @click="makeSure">确定</el-button>
         </div>
     </div>
   </div>
@@ -222,9 +136,12 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      isSend:false,
       isLoading:false,
       list: [],
-      form1: {},
+      form1: {
+        resultLoadingDate:new Date()
+      },
       tableData:[],
       tableDataReal:[],
       selectionRow:[],
@@ -266,6 +183,19 @@ export default {
     this.searchLoadTemp();
   },
   methods: {
+    findWagon(){
+      this.tableDataReal=[];
+      this.isSend=true;
+      this.tableData.forEach((item)=>{
+        if(item.foreignShipName.includes(this.input) || item.wagonNo.includes(this.input)){
+          this.tableDataReal.push(item);
+        }
+      });
+      if(this.tableDataReal.length<=0){
+        this.$message.warning("查询不到记录!");
+      }
+      console.log("serachResult:",this.tableDataReal);
+    },
     //发站弹出层
     handleSelectSendStation(item) {
       this.sendStationId = item.arrivalId;
@@ -355,6 +285,22 @@ export default {
           return;
         }
       }
+      let date=this.form1.resultLoadingDate;
+      let month=(date.getMonth()+1);
+      let day=date.getDate();
+      if(month>=1 && month <=9){
+        month="0"+month;
+      }
+      if(day>=1 && day<=9){
+        day="0"+day;
+      }
+      let dateStr=date.getFullYear()+"年"+month+"月"+day+"日";
+      this.selectionRow.forEach((item)=>{
+        if(!item.sendDate || !item.arrivalDate){
+          item.sendDate=dateStr;
+          item.arrivalDate=dateStr;
+        }
+      });
       let map = {
         wagonList:this.selectionRow,
         sendStationId: this.sendStationId,
@@ -576,16 +522,19 @@ export default {
         });
         that.tableDataReal=tableData;
         if(tableData.length<=0){
-          that.$confirm('查询不到相关车皮!')
+          that.$confirm('查询不到相关车皮!可能是没有出库,请联系万州港相关人员!')
           .then(_ => {
+            that.isSend=false;
             done();
           });
         }else if(tableData.length<importData.length){
-           that.$confirm("共"+(importData.length-tableData.length)+"条车皮查询失败!")
+           that.$confirm("共"+(importData.length-tableData.length)+"条车皮查询失败!可能是没有出库,请联系万州港相关人员!")
           .then(_ => {
+            that.isSend=false;
             done();
           });
         }else{
+          that.isSend=true;
           that.$message({
             message: "查询成功!",
             type: "success",

+ 53 - 248
src/views/TMS/components/importedMine/addWagonPlease.vue

@@ -2,67 +2,25 @@
   <!-- 新增请作业页面 -->
   <div class="contractDetails">
     <page-title>返回</page-title>
-
-    <div class="form">
-      <div class="form_box">
-        <dil-form :formId="122" v-model="form1"></dil-form>
-      </div>
-    </div>
-    <div class="fromOther">
-      <el-form :inline="true" class="demo-form-inline" label-width="80px" style="margin-left:525px;">
-        <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>
+    <div>
+      <el-form   label-width="80px" style="margin-left:35%;">
+        <el-form-item label="批复车数">
+          <el-input v-model="form.resultApproveNumber" type="number" style="width:240px"></el-input>
         </el-form-item>
-      </el-form>
-      <el-form :inline="true" class="demo-form-inline" label-width="80px" style="margin-left:525px;">
-        <el-form-item label="发站">
-          <el-autocomplete
-            class="inline-input"
-            v-model="sendStation"
-            :fetch-suggestions="querySearchSendStation"
-            placeholder="请输入发站名称"
-            :trigger-on-focus="false"
-            @select="handleSelectSendStation"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.arrivalName }}</div>
-            </template>
-          </el-autocomplete>
+        <el-form-item label="落空车数">
+          <el-input v-model="form.resultVoidNumber" type="number" style="width:240px"></el-input>
         </el-form-item>
-      </el-form>
-      <el-form :inline="true" class="demo-form-inline" label-width="80px" style="margin-left:525px;">
-        <el-form-item label="到站">
-          <el-autocomplete
-            class="inline-input"
-            v-model="toTheStation"
-            :fetch-suggestions="querySearchToTheStation"
-            placeholder="请输入到站名称"
-            :trigger-on-focus="false"
-            @select="handleSelectToTheStation"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.arrivalName }}</div>
-            </template>
-          </el-autocomplete>
+        <el-form-item label="实装车数">
+          <el-input v-model="form.resultRealNumber" type="number" style="width:240px"></el-input>
+        </el-form-item>
+        <el-form-item label="日期">
+          <el-date-picker v-model="form.resultDate" type="datetime" placeholder="日期" @change="getRealNumber"></el-date-picker>
         </el-form-item>
       </el-form>
-    </div>
-    <div class="trainTransport">
       <!-- 确定和取消 -->
-      <div class="button_box">
-        <el-button @click="onClickCancel">返回</el-button>
-        <el-button type="primary" @click="onClickConfirm">确认</el-button>
+      <div style="margin-left:40%">
+        <el-button @click="cancel">返回</el-button>
+        <el-button type="primary" @click="makeSure">确认</el-button>
       </div>
     </div>
   </div>
@@ -76,211 +34,58 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      // 表单
-      form1: {},
-      supplierId: null,
-      supplierName: "",
-      stateSupplier: "",
-      sendStationId:2,
-      toTheStationId:1,
-      sendStation:"万州港",
-      toTheStation:"老区轨道衡"
+      form:{
+        resultRealNumber:0,
+        resultDate:new Date()
+      }
     };
   },
   created() {
     
+  },
+  mounted(){
+    this.getRealNumber();
   },
   methods: {
-    handleCheckedCitiesChange(value) {
-      console.log(value);
-    },
-    //发站弹出层
-    handleSelectSendStation(item) {
-      this.sendStationId = item.arrivalId;
-      this.sendStation = item.arrivalName;
-    },
-    //以下是发站边输边查搜索
-    querySearchSendStation(queryString, cb) {
-      this.axios
-        .get("/api/v1/uc/getArrivalByLike?index=" + this.sendStation)
-        .then((res) => {
-          if (res.data.code == "200") {
-            var restaurantsSupplier = res.data.data;
-            console.log(restaurantsSupplier)
-            var results = queryString
-              ? restaurantsSupplier.filter(
-                  this.createFilterSendStation(queryString)
-                )
-              : restaurantsSupplier;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
-        });
-    },
-    //发站
-    createFilterSendStation(queryString) {
-      return (restaurantsSupplier) => {
-        return (
-          restaurantsSupplier.arrivalName
-            .toLowerCase()
-            .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
-    },
-    //到站弹出层
-    handleSelectToTheStation(item) {
-      this.toTheStationId = item.arrivalId;
-      this.toTheStation = item.arrivalName;
-    },
-    //以下是到站边输边查搜索
-    querySearchToTheStation(queryString, cb) {
-      this.axios
-        .get("/api/v1/uc/getArrivalByLike?index=" + this.toTheStation)
-        .then((res) => {
-          if (res.data.code == "200") {
-            var restaurantsSupplier = res.data.data;
-            console.log(restaurantsSupplier)
-            var results = queryString
-              ? restaurantsSupplier.filter(
-                  this.createFilterToTheStation(queryString)
-                )
-              : restaurantsSupplier;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
-        });
-    },
-    //到站
-    createFilterToTheStation(queryString) {
-      return (restaurantsSupplier) => {
-        return (
-          restaurantsSupplier.arrivalName
-            .toLowerCase()
-            .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
-    },
-    //发货单位弹出层
-    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() {
+    cancel() {
       this.$router.go(-1);
     },
-    // 确认
-    onClickConfirm() {
-      let tmstrainPleaseApproveResult = {
-        resultPlanDate: sjTime(this.form1.resultPlanDate),
-        resultCategory: this.form1.resultCategory,
-        supplierId: this.supplierId,
-        sendStationId: this.sendStationId,
-        toTheStationId: this.toTheStationId,
-        resultPleaseNumber: this.form1.resultPleaseNumber,
-        userId: getCookie("orgCode"),
-        resultType: 1,
-      };
-      function isNumber() {
-        var value = tmstrainPleaseApproveResult.resultPleaseNumber;
-        //验证是否为数字
-        var patrn = /^(-)?\d+(\.\d+)?$/;
-        if (patrn.exec(value) == null || value == "") {
-          return false;
-        } else {
-          return true;
-        }
+    makeSure() {
+      console.log("form",this.form.resultVoidNumber-this.form.resultApproveNumber);
+      if(!this.form.resultDate ||
+      !this.form.resultApproveNumber||
+      !this.form.resultVoidNumber||
+      !this.form.resultRealNumber){
+        this.$message.warning("存在空值!");
+        return;
+      }else if(this.form.resultVoidNumber-this.form.resultApproveNumber>0){
+        this.$message.warning("落空车数不能超过批复车数!");
+        return;
       }
-      var val = this.value;
-      if (
-        tmstrainPleaseApproveResult.resultPlanDate == null ||
-        tmstrainPleaseApproveResult.resultCategory == null ||
-        tmstrainPleaseApproveResult.supplierId == null ||
-        tmstrainPleaseApproveResult.sendStationId == null ||
-        tmstrainPleaseApproveResult.toTheStationId == null ||
-        tmstrainPleaseApproveResult.resultPleaseNumber == null
-      )
-        this.$message.error("存在空值!");
-      else if (!isNumber(val)) this.$message.error("请车数量必须是数字!");
-      else
-        this.axios
-          .post("/api/v1/tms/addWagonPlease", tmstrainPleaseApproveResult)
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "新增成功!",
-            });
-            this.$router.go(-1);
+      this.form.resultDate= sjTime(this.form.resultDate);
+      this.form.resultSurplusNumber=this.form.resultApproveNumber-this.form.resultVoidNumber;
+      this.form.userId= getCookie("userId");
+      this.axios.post("/api/v1/tms/addPleaseResult", this.form).then(() => {
+          this.$message({
+            type: "success",
+            message: "新增成功!",
           });
+          this.$router.go(-1);
+        });
     },
+    //获取当天车皮数量
+    getRealNumber(){
+      if(this.form.resultDate){
+        this.form.resultDate=sjTime(this.form.resultDate);
+        this.axios.post("/api/v1/tms/getRealNumber",this.form).then((res)=>{
+          console.log("res",res);
+          this.form.resultRealNumber=res.data.data;
+          console.log("form",this.form);
+        });
+      }
+    }
   },
 };
 </script>
 <style lang="scss">
-.contractDetails {
-  .form {
-    display: flex;
-    .form_box {
-      width: 340px;
-      margin-left: 35%;
-      margin-top: 30px;
-      margin-right: 20px;
-      .el-form {
-        .preview-group {
-          .el-form-item {
-            .el-form-item__label {
-              display: inline-block;
-              width: 70px !important;
-            }
-            .el-form-item__content {
-              .el-select {
-                width: 250px;
-              }
-              .el-input {
-                width: 250px;
-              }
-            }
-            .button_box {
-              margin-left: 42%;
-              margin-top: 55px;
-            }
-          }
-        }
-      }
-    }
-  }
-  .trainTransport{
-    .button_box{
-      margin-left: 40%;
-      margin-bottom: 2px;
-
-    }
-  }
-}
 </style>

+ 15 - 5
src/views/TMS/components/importedMine/addWagonloadCopy.vue

@@ -86,7 +86,7 @@
           align="center"
           prop="makeDate"
           label="制票日期"
-          width="120px"
+          width="170px"
         >
         </el-table-column>
         <el-table-column
@@ -121,7 +121,7 @@
            float:right;"
     >
       <div class="form">
-        <div class="form_box" style="">
+        <div class="form_box_addWagonLoad" style="">
           <el-form>
             <div class="preview-group">
               <el-form-item label="发站:">
@@ -627,7 +627,7 @@ export default {
             //表格数据
             let temp = {
               number: row["序号"],
-              makeDate: row["制票日期"],
+              makeDate:that.formatDate(row["制票日期"]) ,
               materialName: row["品名"],
               wagonNo: row["车皮号"]+"",
               mineral: row["矿种"],
@@ -662,6 +662,17 @@ export default {
           tempTable.toggleRowSelection(row);
        }
     },
+    formatDate(numb, format) {
+      const time = new Date((numb - 1) * 24 * 3600000 + 1)
+      time.setYear(time.getFullYear() - 70)
+      const year = time.getFullYear() + ''
+      const month = time.getMonth() + 1 + ''
+      const date = time.getDate() + ''
+      if (format && format.length === 1) {
+        return year + format + month + format + date
+      }
+      return year + '年' + (month < 10 ? '0' + month : month)+ '月' + (date < 10 ? '0' + date : date) + '日'
+    }
   }
 };
 </script>
@@ -785,9 +796,8 @@ export default {
   }
   .form {
     display: flex;
-    .form_box {
+    .form_box_addWagonLoad {
       width: 340px;
-      margin-left:10px;
       .el-form {
         .preview-group {
           .el-form-item {

+ 51 - 251
src/views/TMS/components/importedMine/editWagonPlease.vue

@@ -1,67 +1,27 @@
 <template>
+  <!-- 新增请作业页面 -->
   <div class="contractDetails">
     <page-title>返回</page-title>
-
-    <div class="form">
-      <div class="form_box">
-        <dil-form :formId="117" v-model="form1"></dil-form>
-      </div>
-    </div>
-    <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>
+    <div>
+      <el-form   label-width="80px" style="margin-left:35%;">
+        <el-form-item label="批复车数">
+          <el-input v-model="form.resultApproveNumber" type="number" style="width:240px"></el-input>
         </el-form-item>
-      </el-form>
-        <el-form :inline="true" class="demo-form-inline" label-width="80px" >
-        <el-form-item label="发站:">
-          <el-autocomplete
-            class="inline-input"
-            v-model="sendStation"
-            :fetch-suggestions="querySearchSendStation"
-            placeholder="请输入发站名称"
-            :trigger-on-focus="false"
-            @select="handleSelectSendStation"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.arrivalName }}</div>
-            </template>
-          </el-autocomplete>
+        <el-form-item label="落空车数">
+          <el-input v-model="form.resultVoidNumber" type="number" style="width:240px"></el-input>
         </el-form-item>
-      </el-form>
-      <el-form :inline="true" class="demo-form-inline" label-width="80px" >
-        <el-form-item label="到站:">
-          <el-autocomplete
-            class="inline-input"
-            v-model="toTheStation"
-            :fetch-suggestions="querySearchToTheStation"
-            placeholder="请输入到站名称"
-            :trigger-on-focus="false"
-            @select="handleSelectToTheStation"
-          >
-            <template slot-scope="{ item }">
-              <div class="name">{{ item.arrivalName }}</div>
-            </template>
-          </el-autocomplete>
+        <el-form-item label="实装车数">
+          <el-input v-model="form.resultRealNumber" type="number" style="width:240px"></el-input>
+        </el-form-item>
+        <el-form-item label="日期">
+          <el-date-picker v-model="form.resultDate" type="datetime" placeholder="日期" @change="getRealNumber"></el-date-picker>
         </el-form-item>
       </el-form>
-    </div>
-
-    <!-- 确定和取消 -->
-    <div class="button_box">
-      <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm">确认</el-button>
+      <!-- 确定和取消 -->
+      <div style="margin-left:40%">
+        <el-button @click="cancel">返回</el-button>
+        <el-button type="primary" @click="makeSure">确认</el-button>
+      </div>
     </div>
   </div>
 </template>
@@ -69,18 +29,12 @@
 <script>
 import PageTitle from "@/components/Page/Title";
 import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
-      form1: {},
-      supplierId: null,
-      supplierName: "",
-      stateSupplier: "",
-      sendStationId:null,
-      toTheStationId:null,
-      sendStation:"",
-      toTheStation:""
+      form:null,
     };
   },
   mounted() {
@@ -90,204 +44,50 @@ export default {
     information() {
       //编辑请车作业
       this.axios
-        .post("/api/v1/tms/getWagonPleaseById/" + this.$route.params.resultId)
+        .post("/api/v1/tms/getPleaseResult/" + this.$route.params.resultId)
         .then((res) => {
-          res.data.data.forEach((e) => {
-            this.form1 = e;
-            console.log(e)
-            this.toTheStationId = e.toTheStationId
-            this.sendStationId = e.sendStationId
-            this.sendStation = e.sendName
-            this.toTheStation = e.arrivalName
-          });
-          
-          this.stateSupplier = res.data.data[0].supplierName;
-          this.supplierId = res.data.data[0].supplierId;
+          this.form=res.data.data;
         });
     },
-    // 返回
-    onClickCancel() {
+    cancel() {
       this.$router.go(-1);
     },
-       //发货单位弹出层
-    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);
-        };
-      },
-    //发站弹出层
-    handleSelectSendStation(item) {
-      this.sendStationId = item.arrivalId;
-      this.sendStation = item.arrivalName;
-    },
-    //以下是发站边输边查搜索
-    querySearchSendStation(queryString, cb) {
-      this.axios
-        .get("/api/v1/uc/getArrivalByLike?index=" + this.sendStation)
-        .then((res) => {
-          if (res.data.code == "200") {
-            var restaurantsSupplier = res.data.data;
-            console.log(restaurantsSupplier)
-            var results = queryString
-              ? restaurantsSupplier.filter(
-                  this.createFilterSendStation(queryString)
-                )
-              : restaurantsSupplier;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
+    makeSure() {
+      if(!this.form.resultDate ||
+      !this.form.resultApproveNumber||
+      !this.form.resultVoidNumber||
+      !this.form.resultRealNumber){
+        this.$message.warning("存在空值!");
+        return;
+      }else if(this.form.resultVoidNumber-this.form.resultApproveNumber>0){
+        this.$message.warning("落空车数不能超过批复车数!");
+        return;
+      }
+      this.form.resultDate= sjTime(this.form.resultDate);
+      this.form.resultSurplusNumber=this.form.resultApproveNumber-this.form.resultVoidNumber;
+      this.form.userId= getCookie("userId");
+      this.axios.post("/api/v1/tms/editPleaseResult", this.form).then(() => {
+          this.$message({
+            type: "success",
+            message: "修改成功!",
+          });
+          this.$router.go(-1);
         });
     },
-    //发站
-    createFilterSendStation(queryString) {
-      return (restaurantsSupplier) => {
-        return (
-          restaurantsSupplier.arrivalName
-            .toLowerCase()
-            .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
-    },
-    //到站弹出层
-    handleSelectToTheStation(item) {
-      this.toTheStationId = item.arrivalId;
-      this.toTheStation = item.arrivalName;
-    },
-    //以下是到站边输边查搜索
-    querySearchToTheStation(queryString, cb) {
-      this.axios
-        .get("/api/v1/uc/getArrivalByLike?index=" + this.toTheStation)
-        .then((res) => {
-          if (res.data.code == "200") {
-            var restaurantsSupplier = res.data.data;
-            console.log(restaurantsSupplier)
-            var results = queryString
-              ? restaurantsSupplier.filter(
-                  this.createFilterToTheStation(queryString)
-                )
-              : restaurantsSupplier;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-          }
+    //获取当天车皮数量
+    getRealNumber(){
+      if(this.form.resultDate){
+        this.form.resultDate=sjTime(this.form.resultDate);
+        this.axios.post("/api/v1/tms/getRealNumber",this.form).then((res)=>{
+          console.log("res",res);
+          this.form.resultRealNumber=res.data.data;
+          console.log("form",this.form);
         });
-    },
-    //到站
-    createFilterToTheStation(queryString) {
-      return (restaurantsSupplier) => {
-        return (
-          restaurantsSupplier.arrivalName
-            .toLowerCase()
-            .indexOf(queryString.toLowerCase()) > -1
-        );
-      };
-    },
-
-    // 确认
-    onClickConfirm() {
-      let tmstrainPleaseApproveResult = {
-        resultId: this.$route.params.resultId,
-        resultPlanDate: sjTime(this.form1.resultPlanDate),
-        resultCategory: this.form1.resultCategory,
-        supplierId: this.supplierId,
-        sendStationId: this.sendStationId,
-        toTheStationId: this.toTheStationId,
-        resultPleaseNumber: this.form1.resultPleaseNumber,
-      };
-      console.log(tmstrainPleaseApproveResult)
-      function isNumber() {
-        var value = tmstrainPleaseApproveResult.resultPleaseNumber;
-        //验证是否为数字
-        var patrn = /^(-)?\d+(\.\d+)?$/;
-        if (patrn.exec(value) == null || value == "") {
-          return false;
-        } else {
-          return true;
-        }
       }
-      var val = this.value;
-      if (
-        tmstrainPleaseApproveResult.resultPlanDate == null ||
-        tmstrainPleaseApproveResult.resultCategory == null ||
-        tmstrainPleaseApproveResult.supplierId == null ||
-        tmstrainPleaseApproveResult.sendStationId == null ||
-        tmstrainPleaseApproveResult.toTheStationId == null ||
-        tmstrainPleaseApproveResult.resultPleaseNumber == null
-      )
-        this.$message.error("存在空值!");
-      else if (!isNumber(val)) this.$message.error("请车数必须是数字!");
-      else
-        this.axios
-          .post(
-            "/api/v1/tms/updateApproveWagonPlease",
-            tmstrainPleaseApproveResult
-          )
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "修改成功!",
-            });
-            this.$router.go(-1);
-          });
-    },
+    }
   },
 };
 </script>
 <style lang="scss">
-.contractDetails {
-  .form {
-    display: flex;
-    .form_box {
-      width: 340px;
-      margin-left: 35%;
-      margin-top: 30px;
-      margin-right: 20px;
-      .el-form {
-        .preview-group {
-          .el-form-item {
-            .el-form-item__label {
-              display: inline-block;
-              width: 70px !important;
-            }
-            .el-form-item__content {
-              .el-select {
-                width: 250px;
-              }
-              .el-input {
-                width: 250px;
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-  .button_box {
-    margin-left: 42%;
-    margin-top: 55px;
-  }
-  .fromOther {
-  margin-left: 34.5%;
-  width: 50%;
-  .el-input__inner{
-    width: 250px;
-  
-  }
-}
-}
 
 </style>

+ 111 - 19
src/views/TMS/components/importedMine/outBoundWagon.vue

@@ -2,16 +2,40 @@
   <!-- 出库 -->
   <div class="homeworkPath">
     <div class="top">
-      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-
+      <el-input placeholder="请输入内容" v-model="input" clearable style="width:200px"> </el-input>
+      <el-date-picker style="margin: 10px;width:250px" v-model="startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;width:250px" v-model="endTime" type="datetime" placeholder="结束日期"></el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" class="btn" @click="insert"> 出库 </el-button>
+      <el-button type="primary" @click="exportData()" ><i class="el-icon-download"></i>导出(Excel)</el-button>
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
-      <mergeRowTable v-bind.sync="option1" ref="table">
-        <el-table-column fixed="right" label="操作" width="50">
+      <el-tab-pane label="全部" name="first">
+        <mergeRowTable v-bind.sync="option1" ref="excelDom" @func="calculate">
+        <el-table-column fixed="right" label="操作" width="80">
+          <template slot-scope="scope">
+            <el-button
+              @click="click(scope.row.resultId)"
+              type="text"
+              size="small"
+              :disabled="scope.row.isEdit!=1"
+              >修改</el-button
+            >
+            <el-button
+            type="text"
+            size="small"
+            :disabled="scope.row.isEdit!=1"
+            @click="deleteclick(scope.row.resultId)"
+            >删除</el-button >
+          </template>
+        </el-table-column>
+      </mergeRowTable>
+      </el-tab-pane>
+      <el-tab-pane label="待计量" name="second">
+        <mergeRowTable v-bind.sync="option1" ref="excelDom" @func="calculate">
+        <el-table-column fixed="right" label="操作" width="80">
           <template slot-scope="scope">
             <el-button
               @click="click(scope.row.resultId)"
@@ -20,20 +44,27 @@
               :disabled="scope.row.isEdit!=1"
               >修改</el-button
             >
-            <!-- <el-button
+            <el-button
             type="text"
             size="small"
+            :disabled="scope.row.isEdit!=1"
             @click="deleteclick(scope.row.resultId)"
-            >删除</el-button > -->
+            >删除</el-button >
           </template>
         </el-table-column>
       </mergeRowTable>
+      </el-tab-pane>
     </el-tabs>
+    <div class="count"  style="margin-right:50px;font-size:18px;">
+      <div style="display:flex;flex-direction:row-reverse">总车数:{{dataTabel.length}}</div>
+      <div style="display:flex;flex-direction:row-reverse">标重总吨位:{{sum}}</div>
+    </div>
   </div>
 </template>
 
 <script>
 import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "inplantTMS",
   data() {
@@ -47,34 +78,95 @@ export default {
         comparison: "resultNumber",
         columnIndexs: [0, 1, 2, 3, 4, 5],
       },
+      startTime: null,
+      endTime: null,
+      tableTitle: "港口出库表",
+      dataTabel:[],
+      sum:0,
     };
   },
   filters: {},
+  mounted(){
+    this.onclick();
+  },
   methods: {
     onclick() {
       if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input;
+        if(this.checkSEDate()==true){
+          this.option1.requestUrl =
+          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
+          +"&activeName="+this.activeName
+          +"&startTime="+sjTime(this.startTime)
+          +"&endTime="+sjTime(this.endTime);
+        }else{
+          this.option1.requestUrl =
+          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
+           +"&activeName="+this.activeName;
+        }
+      }else if(this.activeName == "second"){
+        if(this.checkSEDate()==true){
+          this.option1.requestUrl =
+          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
+           +"&activeName="+this.activeName
+           +"&startTime="+sjTime(this.startTime)
+          +"&endTime="+sjTime(this.endTime);
+        }else{
+          this.option1.requestUrl =
+          "/api/v1/wmsh/getUnLockPortStock?apiId=494&con=" + this.input
+          +"&activeName="+this.activeName;
+        }
       }
     },
     insert() {
       this.$router.push("/addWagonLoadCopy");
     },
     handleClick(tab, event) {
-      console.log(tab, event);
+      this.onclick();
     },
     click(resultId) {
-      console.log("res",getCookie("orgCode"));
-      if (
-        getCookie("orgCode") == "yuanliaogongsi" ||
-        getCookie("orgCode") == "dagangadmin"
-      ) {
-       this.$router.push("/editOutBoundWagon/" + resultId);
-      
-      } else {
-          this.$message.warning("权限不足,请联系部门管理员!");
-        }
+      this.$router.push("/editOutBoundWagon/" + resultId);
+    },
+    deleteclick(resultId){
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true
+      })
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "删除成功!"
+          });
+          this.axios
+            .post( "/api/v1/tms/deleteOutBoundWagonById?resultId=" + resultId)
+            .then(() => {
+              this.onclick();
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消删除!"
+          });
+        });
     },
+    //起止时间校验
+    checkSEDate(){
+      if(this.startTime && this.endTime && this.startTime<=this.endTime){
+          return true;
+      }else{
+         return false;
+      }
+    },
+    calculate(res){
+      console.log("res",res);
+      this.dataTabel=res.list;
+      this.sum=0
+      this.dataTabel.forEach(item => {
+        this.sum+=item.weight;
+      });
+    }
   },
 };
 </script>

+ 50 - 85
src/views/TMS/components/importedMine/wagonPlease.vue

@@ -1,19 +1,28 @@
 <template>
   <!-- 请车作业页面 -->
   <div class="trainTransport">
-    <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="insertClick">
-        <i class="el-icon-plus"></i>新增
-      </el-button>
-    </div>
-    <el-tabs v-model="activeName">
-      <!-- 未下发 -->
-      <el-tab-pane label="未下发" name="first">
-        <dilTable v-bind.sync="option1" ref="table">
+     <div class="search" style="display:flex;margin: 10px;">
+        <!-- <el-input
+          placeholder="请输入"
+          v-model="input"
+          style="margin: 10px; width:10%"
+          clearable
+        ></el-input> -->
+       <el-date-picker style="margin: 10px;" v-model="startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;" v-model="endTime" type="datetime" placeholder="结束日期"></el-date-picker>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="onclick"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <el-button class="btn" style="margin: 10px;" type="primary" @click="insertClick">
+          <i class="el-icon-plus"></i>新增
+        </el-button>
+      </div>
+      <dilTable v-bind.sync="option" ref="table">
           <el-table-column fixed="right" label="操作" width="120">
             <template slot-scope="scope">
               <el-button
@@ -24,75 +33,59 @@
                 修改
               </el-button>
               <el-button
-                @click="deleteClick(scope.row.resultId)"
+                @click="deleteClick(scope.row)"
                 type="text"
                 size="small"
               >
                 删除
               </el-button>
-              <el-button
-                @click="sendClick(scope.row.resultId)"
-                type="text"
-                size="small"
-              >
-                下发
-              </el-button>
             </template>
           </el-table-column>
         </dilTable>
-      </el-tab-pane>
-      <!-- 已下发 -->
-      <el-tab-pane label="已下发" name="second">
-        <dilTable v-bind.sync="option2"></dilTable>
-      </el-tab-pane>
-    </el-tabs>
   </div>
 </template>
 
 <script>
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   name: "inplantTMS",
   data() {
     return {
       input: "",
-      activeName: "first",
-      option1: {
+      startTime:null,
+      endTime:null,
+      option: {
         // 表格请求数据的地址
         requestUrl: ""
       },
-      option2: {
-        // 表格请求数据的地址
-        requestUrl: ""
-      }
     };
   },
   created() {
-    this.getRequestUrl();
+    this.onclick();
   },
   methods: {
-    getRequestUrl() {
-      this.option1.requestUrl =
-        "/api/v1/tms/getAllWagonPlease?apiId=57&status=0&resultType=1" +
-        "&i=" +
-        new Date();
-      this.option2.requestUrl =
-        "/api/v1/tms/getAllWagonPlease?apiId=57&status=1&resultType=1" +
-        "&i=" +
-        new Date();
+    checkDate(){
+      if(this.startTime&&this.endTime&&this.startTime<this.endTime){
+        return true;
+      }else{
+        return false;
+      }
     },
     onclick() {
-      if (this.activeName == "first") {
-        this.option1.requestUrl =
-          "/api/v1/tms/getAllWagonPlease?apiId=57&status=0&resultType=1&con=" +
-          this.input;
+      if (this.checkDate()) {
+        this.option.requestUrl =
+          "/api/v1/tms/getAllPleaseResult?apiId=509&con=" + this.input
+          +"&i="+new Date()
+          +"&startTime="+sjTime(this.startTime)
+          +"&endTime="+sjTime(this.endTime);
       } else {
-        this.option2.requestUrl =
-          "/api/v1/tms/getAllWagonPlease?apiId=57&status=1&resultType=1&con=" +
-          this.input;
+        this.option.requestUrl =
+          "/api/v1/tms/getAllPleaseResult?apiId=509&con=" +this.input
+          +"&i="+new Date();
       }
     },
     // 删除
-    deleteClick(resultId) {
+    deleteClick(row) {
       this.$confirm("是否删除", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -100,49 +93,21 @@ export default {
         center: true
       })
         .then(() => {
+          let map={
+            resultId:row.resultId,
+            deleted:1
+          }
           this.axios
-            .post("/api/v1/tms/deleteApproveWagonPlease/" + resultId)
+            .post("/api/v1/tms/editPleaseResult",map)
             .then(() => {
               this.$message({
                 type: "success",
                 message: "删除成功!"
               });
-              this.getRequestUrl();
+              this.onclick();
             });
         })  
     },
-    // 下发
-    sendClick(resultId) {
-      this.$confirm("是否下发", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true
-      })
-        .then(() => {
-          console.log("enter!1!");
-          this.axios
-            .post("/api/v1/tms/sendWagonPlease/" + resultId)
-            .then(res => {
-              if (res.data.code == "200") {
-                this.getRequestUrl();
-              }
-            });
-          this.$message({
-            type: "success",
-            message: "下发成功!"
-          });
-          // console.log(this.arr[0].text_prop);
-        })
-        .catch(() => {
-          console.log("out!S");
-          this.$message({
-            type: "info",
-            message: "取消下发!"
-          });
-        });
-    },
-
     //新增
     insertClick() {
       this.$router.push("/addWagonPlease/");

+ 188 - 0
src/views/TMS/components/importedShip/recordBatch.vue

@@ -0,0 +1,188 @@
+//补录批次id
+<template>
+  <div class="recordBathch">
+     <div class="purchaseOrder_table">
+      <div class="search" style="display:flex">
+      <el-input
+        placeholder="物资名"
+        v-model="materialName"
+        style="margin-top: 10px; margin-left: 20px; width: 150px"
+        clearable
+      >
+       </el-input>
+       <el-input
+        placeholder="外轮船名"
+        v-model="resultForeignShipName"
+        style="margin-top: 10px; margin-left: 20px; width: 150px"
+        clearable
+      >
+       </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="searchNotice()"
+        style="margin: 10px;">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      </div>
+      <!-- 未绑定金蝶的发货通知及其批次 -->
+      <dilTable
+        v-bind.sync="noticeOption"
+      >
+      <el-table-column
+      fixed="right"
+      label="操作"
+      width="70">
+      <template slot-scope="scope">
+          <el-button
+            @click.native.prevent="ondrawer(scope.row)"
+            type="text"
+            size="small">
+            关联订单
+          </el-button>
+        </template>
+      </el-table-column>
+      </dilTable>
+      </div>
+    
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="物资名或外轮船名"
+        v-model="inputText"
+        style="margin-top: 10px; margin-left: 20px; width: 200px"
+        clearable
+      >
+       </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onClick"
+        style="margin-bottom: 15px">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="makeSure"
+        style="margin-bottom: 15px">
+        确认绑定
+      </el-button>
+      <div v-show="drawer">
+        <dilTable
+        ref="ordertable"
+          v-bind.sync="purchaseOption"
+          @radio-change="orderChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import {getCookie} from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      purchaseOption:{
+        requestUrl: "/api/v1/tms/getBatchIdByForeign?apiId=489",
+        selectionType: "radio"
+      },
+      noticeOption: {
+        // 表格请求数据的地址
+        requestUrl: "/api/v1/tms/findBatchForBind?apiId=489"
+      },
+      //物资名称
+      materialName:'',
+      //外轮船名
+      resultForeignShipName:'',
+      //是否需要打开模态窗口
+      drawer: false,
+      a: 1,
+      direction: "rtl",
+      inputText: null,
+      row:null,
+      order:null,
+    };
+  },
+  mounted(){
+  },
+  methods: {
+    //确定
+    makeSure() {
+      if(this.row!=null && this.order!=null){
+        let map = {
+          batchInfactoryId:this.row.batchInfactoryId,
+          batchIdOld:this.row.batchId,
+          batchId:this.order.batchId,
+          gmId:this.row.gmId,
+          portId:this.row.portId,
+          userId:getCookie("userId")
+        }
+        console.log(map);
+        this.axios.post('/api/v1/tms/bindBatch',map).then((res)=>{
+          console.log(res.data)
+          if(res.data.code == "200"){
+            this.$message({
+              message: "绑定成功!",
+              type: "success",
+            });
+            //刷新表格
+            this.searchNotice();
+            //关闭抽屉
+            this.drawer=false;
+          }
+        })
+      }else{
+        this.$message.warning("请选择采购订单!");
+      }
+      
+    },
+    //采购订单表格选中
+    orderChange(selection){
+        console.log("order:",selection);
+        this.order=selection;
+    },
+
+    currentRadioChange1(selection) {
+      this.input = null;
+      this.materialName = selection.materialName;
+      this.materialId = selection.materialId;
+    },
+    ondrawer(row) {
+      this.drawer = true;
+      this.row=row;
+      this.inputText=row.foreignShipName;
+      console.log("row:",row);
+      this.purchaseOption.requestUrl =
+          "/api/v1/tms/getBatchIdByForeign?apiId=489&con=" + this.inputText;
+    },
+    searchNotice(){
+      //查询发货通知
+        this.noticeOption.requestUrl=
+        "/api/v1/tms/findBatchForBind?apiId=489"+"&materialName="+this.materialName
+        +"&foreignShipName="+this.resultForeignShipName
+        +"&i="+new Date();
+    },
+    onClick() {
+        this.purchaseOption.requestUrl =
+          "/api/v1/tms/getBatchIdByForeign?apiId=489&con=" + this.inputText;
+    },
+    handleClose(done) {
+        this.row=null;
+        done();
+    }
+  },
+};
+</script>
+
+<style lang="scss">
+
+</style>

+ 11 - 1
src/views/TMS/router/index.js

@@ -139,6 +139,7 @@ import updateUnloadShip from "../components/importedShip/updateUnloadShip.vue";
 import updateWaterQuality from "../components/importedShip/updateWaterQuality.vue";
 import updateLoadShip from "../components/importedShip/updateLoadShip.vue";
 import waterQuality from "../components/importedShip/waterQuality.vue";
+import recordBatch from "../components/importedShip/recordBatch.vue";
 
 import assignmentPlan from "../components/importedTruck/assignmentPlan.vue";
 import breakdownPlan from "../components/importedTruck/breakdownPlan.vue";
@@ -963,6 +964,12 @@ const constantRouterMap = [
         meta: { code: "xtpzgl-yhgl" },
         component: waterQuality
       },
+      {
+        path: "recordBatch",
+        name: "recordBatch",
+        meta: { code: "xtpzgl-yhgl" },
+        component: recordBatch
+      },
       {
         path: "updateLoadShip/:resultId",
         name: "updateLoadShip",
@@ -1469,7 +1476,10 @@ const constantRouterMap = [
       },{
         path: "threeSectionFeeDetails",
         name: "threeSectionFeeDetails",
-        meta: { code: "xtpzgl-jggl" },
+        meta: { 
+          code: "xtpzgl-jggl",
+          keepAlive: true // 需要被缓存
+        },
         component: threeSectionFeeDetails
       },
       {

+ 271 - 115
src/views/WMS/components/steel/addSteelInbound.vue

@@ -1,22 +1,34 @@
 <template>
   <!-- 新增入库转预留作业页面 -->
   <div class="addCheckWarehouse">
-    <page-title>入库转预留作业</page-title>
+    <page-title>预留转入库作业</page-title>
     <div class="material from">
       <span class="text">物资规格型号:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
     </div>
     <div class="materialNumber from">
-      <span class="text">最大预留件数:</span>
+      <span class="text">最大入库件数:</span>
       <el-input class="input" v-model="max" disabled> </el-input>
     </div>
     <div class="materialNumber from">
       <span class="text">件数:</span>
-      <el-input class="input" v-model="materialNumber"> </el-input>
+      <el-input class="input" v-model.lazy="materialNumber"> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">理重(磅重)</span>
+      <el-input class="input" v-model="materialTheWeight" disabled> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">实重</span>
+      <el-input class="input" v-model="actuallyWeight"> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">备注</span>
+      <el-input class="input" v-model="remark"> </el-input>
     </div>
     <!-- 模态窗口 -->
-    <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
+    <el-drawer :visible.sync="drawer" :direction="direction" size="50%">
       <div style="margin-bottom: 10px">
         <el-input
           placeholder="请输入内容"
@@ -29,21 +41,33 @@
         </el-button>
       </div>
       <div v-show="a == 1">
-        <dilTable
-          v-bind.sync="first"
-          @radio-change="currentRadioChange1"
-        ></dilTable>
+        <dilTable v-bind.sync="first" @radio-change="currentRadioChange1">
+          <el-table-column label="操作" width="140px">
+            <template slot-scope="scope">
+              <el-input v-model.number="scope.row.quantity" style="width:60px">
+              </el-input>
+              <el-button
+                type="text"
+                size="mini"
+                @click="deleteInboundMaterial(scope.row)"
+                >删除</el-button
+              >
+            </template>
+          </el-table-column>
+        </dilTable>
       </div>
       <div v-show="a == 2">
         <dilTable
           v-bind.sync="second"
           @radio-change="currentRadioChange2"
         ></dilTable>
-      </div>          
+      </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
@@ -55,22 +79,22 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      startTime:null,
-      endTime:null,
-      max:null,
-      disabled:false,
+      startTime: null,
+      endTime: null,
+      max: null,
+      disabled: false,
       //仓库名称
-      warehouseName:null,
+      warehouseName: null,
       //物资名称
       materialName: null,
       //物资编码
-      materialCode:null,
+      materialCode: null,
       // 物资规格
-      materialSpecification:null,
+      materialSpecification: null,
       // 物资型号
-      materialModel:null,
+      materialModel: null,
       //盘点数量
-      materialNumber:null,
+      materialNumber: null,
       //物资id
       materialId: null,
       //是否需要打开模态窗口
@@ -81,12 +105,15 @@ export default {
       first: {
         requestUrl: "",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       second: {
-          requestUrl: "",
-          selectionType:"radio"
-      }
+        requestUrl: "",
+        selectionType: "radio"
+      },
+      materialTheWeight: 0,
+      actuallyWeight: 0,
+      remark: null
     };
   },
   watch: {
@@ -95,46 +122,148 @@ export default {
         this.input = null;
       }
     },
+    materialNumber() {
+      this.getTheoreticalByInfo();
+    }
   },
   created() {
-      let strTime=this.formatDate(new Date(),"yyyy-MM-dd hh:mm:ss")
-      this.startTime= Date.parse(new Date(strTime));
-      this.endTime=new Date(this.startTime+86400000);
+    let strTime = this.formatDate(new Date(), "yyyy-MM-dd hh:mm:ss");
+    this.startTime = Date.parse(new Date(strTime));
+    this.endTime = new Date(this.startTime + 86400000);
   },
   methods: {
-    formatDate (date, fmt) {
-        if (/(y+)/.test(fmt)) {
-          fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
-        }
-        let o = {
-          'M+': date.getMonth() + 1,
-          'd+': date.getDate(),
-          'h+': 0,
-          'm+': 0,
-          's+': 0
+    deleteInboundMaterial(row) {
+      if (Number(row.quantity) > 0) {
+        this.$confirm("确定删除?继续", "提示", {
+          cancelButtonText: "取消",
+          confirmButtonText: "确定"
+        }).then(() => {
+          console.log(row);
+          this.axios
+            .post(
+              "/api/v1/wms/deleteInboundMaterial?warehouseId=3&materialCode=" +
+                row.materialCode +
+                "&materialSpecification=" +
+                row.materialSpecification +
+                "&materialModel=" +
+                row.materialModel +
+                "&quantity=" +
+                row.quantity
+            )
+            .then(res => {
+              if (res.data.code == 200) {
+                this.$message.success("删除成功");
+                this.first.requestUrl =
+                  "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+                  3 +
+                  "&status=" +
+                  1 +
+                  "&con=" +
+                  "" +
+                  "&startTime=" +
+                  sjTime(this.startTime) +
+                  "&endTime=" +
+                  sjTime(this.endTime) +
+                  "&i=" +
+                  new Date();
+              } else {
+                this.$message.error("删除失败");
+              }
+            });
+        });
+      } else {
+        this.$message.warning("请输入需要删除的物资件数");
+      }
+    },
+    getTheoreticalByInfo() {
+      this.axios
+        .post(
+          "/api/v1/wms/getTheoreticalByInfo?warehouseId=" +
+            3 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&num=" +
+            this.materialNumber +
+            "&status=1" +
+            "&i=" +
+            new Date()
+        )
+        .then(res => {
+          if (res.data.data == -1) {
+            this.$message.error("数量超出");
+            this.materialTheWeight = null;
+          } else {
+            this.materialTheWeight = parseFloat(res.data.data);
+          }
+        });
+    },
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+        );
       }
+      let o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": 0,
+        "m+": 0,
+        "s+": 0
+      };
       for (let k in o) {
         if (new RegExp(`(${k})`).test(fmt)) {
-          let str = o[k] + ''
-          fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : this.padLeftZero(str))
+          let str = o[k] + "";
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : this.padLeftZero(str)
+          );
         }
-            }
-      return fmt
+      }
+      return fmt;
     },
-    padLeftZero (str) {
-        return ('00' + str).substr(str.length)
+    padLeftZero(str) {
+      return ("00" + str).substr(str.length);
     },
     onclick(a) {
       if (a == 1) {
-        console.log(this.input)
-        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+3+"&status="+1+"&con="+this.input+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
+        console.log(this.input);
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          3 +
+          "&status=" +
+          1 +
+          "&con=" +
+          this.input +
+          "&startTime=" +
+          sjTime(this.startTime) +
+          "&endTime=" +
+          sjTime(this.endTime) +
+          "&i=" +
+          new Date();
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
-      if(num==1){
-          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+3+"&status="+1+"&con="+""+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
+      if (num == 1) {
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          3 +
+          "&status=" +
+          1 +
+          "&con=" +
+          "" +
+          "&startTime=" +
+          sjTime(this.startTime) +
+          "&endTime=" +
+          sjTime(this.endTime) +
+          "&i=" +
+          new Date();
       }
     },
     // 返回
@@ -150,97 +279,124 @@ export default {
       this.max = selection.max;
     },
     currentRadioChange2(selection) {
-      this.warehouseId = selection.warehouseId
-      this.warehouseName = selection.warehouseName
+      this.warehouseId = selection.warehouseId;
+      this.warehouseName = selection.warehouseName;
     },
     // 确认
     onClickConfirm() {
-      // console.log(this.warehouseId,this.materialCode,this.materialNumber);
-      this.disabled = true
-      this.axios.post("/api/v1/wms/insertReserved?warehouseId=" + 3 + "&materialCode=" + this.materialCode+"&materialSpecification="+this.materialSpecification+"&materialModel="+this.materialModel+ "&quantity=" + this.materialNumber ).then((res) => {
-        console.log(res.data)
+      this.disabled = true;
+      // if(isNumber(this.actuallyWeight))
+      if (!isNumber(this.actuallyWeight)) {
+        this.$message.error("实重填写不正确");
+        return;
+      }
+      this.axios
+        .post(
+          "/api/v1/wms/insertReserved?warehouseId=" +
+            3 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&quantity=" +
+            this.materialNumber +
+            "&actuallyWeight=" +
+            Number(parseFloat(this.actuallyWeight)) +
+            "&materialTheWeight=" +
+            Number(parseFloat(this.materialTheWeight)) +
+            "&remark=" +
+            this.remark
+        )
+        .then(res => {
+          console.log(res.data);
           if (res.data.code == "200") {
             this.$message({
-              message: "预留成功!",
-              type: "success",
+              message: "入库成功!",
+              type: "success"
             });
-            this.disabled = false
-            this.onClickCancel()
-            this.$router.go(-1)
-          }else if(res.data.code=="201"){
+            this.disabled = false;
+            this.onClickCancel();
+            this.$router.go(-1);
+          } else if (res.data.code == "201") {
             this.$message({
-              message:"预留的数量不正确",
-              type:"faile",
-            })
+              message: "入库的数量不正确",
+              type: "faile"
+            });
+            this.disabled = false;
           }
-          this.$router.go(-1)
+          this.$router.go(-1);
+        })
+        .catch(() => {
+          this.disabled = false;
         });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scope>
-.addCheckWarehouse{
-.contractDetails {
-  width: 100%;
-}
-.from {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.warehouse {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  margin-right: 70px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+.addCheckWarehouse {
+  .contractDetails {
+    width: 100%;
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .from {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 5px;
+    margin-bottom: 20px;
   }
-}
-.material {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .warehouse {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .material {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.materialNumber {
+  .materialNumber {
     display: flex;
     justify-content: center;
     margin-top: 20px;
     margin-right: 70px;
     .text {
-        display:inline-block;
-        width: 170px;
-        text-align: right;
+      display: inline-block;
+      width: 170px;
+      text-align: right;
     }
     .input {
-        width: 250px;
-        margin-right: 20px;
+      width: 250px;
+      margin-right: 20px;
     }
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 100px;
+  }
 }
-.button_box {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100px;
-}
-}
-</style>
+</style>

+ 120 - 90
src/views/WMS/components/steel/addSteelReserved.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 新增预留转入库作业页面 -->
   <div class="addCheckWarehouse">
-    <page-title>预留转入库作业</page-title>
+    <page-title>入库转预留作业</page-title>
     <div class="material from">
       <span class="text">物资规格型号:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
@@ -39,11 +39,13 @@
           v-bind.sync="second"
           @radio-change="currentRadioChange2"
         ></dilTable>
-      </div>          
+      </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
@@ -55,20 +57,20 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      max:null,
-      disabled:false,
+      max: null,
+      disabled: false,
       //仓库名称
-      warehouseName:null,
+      warehouseName: null,
       //物资名称
       materialName: null,
       //物资编码
-      materialCode:null,
-       // 物资规格
-      materialSpecification:null,
+      materialCode: null,
+      // 物资规格
+      materialSpecification: null,
       // 物资型号
-      materialModel:null,
+      materialModel: null,
       //盘点数量
-      materialNumber:null,
+      materialNumber: null,
       //物资id
       materialId: null,
       //是否需要打开模态窗口
@@ -79,11 +81,11 @@ export default {
       first: {
         requestUrl: "",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       second: {
-          requestUrl: "",
-          selectionType:"radio"
+        requestUrl: "",
+        selectionType: "radio"
       }
     };
   },
@@ -92,22 +94,32 @@ export default {
       if (!val) {
         this.input = null;
       }
-    },
-  },
-  created() {
-      
+    }
   },
+  created() {},
   methods: {
     onclick(a) {
       if (a == 1) {
-        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+3+"&status="+2+"&con="+this.input
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          3 +
+          "&status=" +
+          2 +
+          "&con=" +
+          this.input;
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
-      if(num==1){
-          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+3+"&status="+2+"&con="+""
+      if (num == 1) {
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          3 +
+          "&status=" +
+          2 +
+          "&con=" +
+          "";
       }
     },
     // 返回
@@ -116,7 +128,12 @@ export default {
     },
     currentRadioChange1(selection) {
       console.log(selection);
-      this.materialName = selection.materialName + selection.materialSpecification + '(' + selection.materialModel + ')' ;
+      this.materialName =
+        selection.materialName +
+        selection.materialSpecification +
+        "(" +
+        selection.materialModel +
+        ")";
       this.materialId = selection.materialId;
       this.materialCode = selection.materialCode;
       this.materialSpecification = selection.materialSpecification;
@@ -124,97 +141,110 @@ export default {
       this.max = selection.max;
     },
     currentRadioChange2(selection) {
-      this.warehouseId = selection.warehouseId
-      this.warehouseName = selection.warehouseName
+      this.warehouseId = selection.warehouseId;
+      this.warehouseName = selection.warehouseName;
     },
     // 确认
     onClickConfirm() {
       // console.log(this.warehouseId,this.materialCode,this.materialNumber);
-      this.disabled = true
-      this.axios.post("/api/v1/wms/insertInbounds?warehouseId=" + 3 + "&materialCode=" + this.materialCode+"&materialSpecification="+this.materialSpecification+"&materialModel="+this.materialModel+ "&quantity=" + this.materialNumber ).then((res) => {
-        console.log(res.data)
+      this.disabled = true;
+      this.axios
+        .post(
+          "/api/v1/wms/insertInbounds?warehouseId=" +
+            3 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&quantity=" +
+            this.materialNumber
+        )
+        .then(res => {
+          console.log(res.data);
           if (res.data.code == "200") {
             this.$message({
-              message: "入库成功!",
-              type: "success",
+              message: "转预留成功!",
+              type: "success"
             });
-            this.disabled = false
-            this.onClickCancel()
-            this.$router.go(-1)
-          }else if(res.data.code=="201"){
+            this.disabled = false;
+            this.onClickCancel();
+            this.$router.go(-1);
+          } else if (res.data.code == "201") {
             this.$message({
-              message:"入库的数量不正确",
-              type:"faile",
-            })
+              message: "转预留的数量不正确",
+              type: "faile"
+            });
           }
-          this.$router.go(-1)
+          this.$router.go(-1);
         });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scope>
-.addCheckWarehouse{
-.contractDetails {
-  width: 100%;
-}
-.from {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.warehouse {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  margin-right: 70px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+.addCheckWarehouse {
+  .contractDetails {
+    width: 100%;
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .from {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 5px;
+    margin-bottom: 20px;
   }
-}
-.material {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .warehouse {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .material {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.materialNumber {
+  .materialNumber {
     display: flex;
     justify-content: center;
     margin-top: 20px;
     margin-right: 70px;
     .text {
-        display:inline-block;
-        width: 170px;
-        text-align: right;
+      display: inline-block;
+      width: 170px;
+      text-align: right;
     }
     .input {
-        width: 250px;
-        margin-right: 20px;
+      width: 250px;
+      margin-right: 20px;
     }
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 100px;
+  }
 }
-.button_box {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100px;
-}
-}
-</style>
+</style>

+ 273 - 115
src/views/WMS/components/steel/bar1_steel/bar1_addSteelInbound.vue

@@ -1,19 +1,31 @@
 <template>
   <!-- 新增入库转预留作业页面 -->
   <div class="addCheckWarehouse">
-    <page-title>入库转预留作业</page-title>
+    <page-title>预留转入库作业</page-title>
     <div class="material from">
       <span class="text">物资规格型号:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
     </div>
     <div class="materialNumber from">
-      <span class="text">最大预留件数:</span>
+      <span class="text">最大入库件数:</span>
       <el-input class="input" v-model="max" disabled> </el-input>
     </div>
     <div class="materialNumber from">
       <span class="text">件数:</span>
-      <el-input class="input" v-model="materialNumber"> </el-input>
+      <el-input class="input" v-model.lazy="materialNumber"> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">理重(磅重)</span>
+      <el-input class="input" v-model="materialTheWeight" disabled> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">实重</span>
+      <el-input class="input" v-model="actuallyWeight"> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">备注</span>
+      <el-input class="input" v-model="remark"> </el-input>
     </div>
     <!-- 模态窗口 -->
     <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
@@ -29,21 +41,33 @@
         </el-button>
       </div>
       <div v-show="a == 1">
-        <dilTable
-          v-bind.sync="first"
-          @radio-change="currentRadioChange1"
-        ></dilTable>
+        <dilTable v-bind.sync="first" @radio-change="currentRadioChange1">
+          <el-table-column label="操作" width="140px">
+            <template slot-scope="scope">
+              <el-input v-model.number="scope.row.quantity" style="width:60px">
+              </el-input>
+              <el-button
+                type="text"
+                size="mini"
+                @click="deleteInboundMaterial(scope.row)"
+                >删除</el-button
+              >
+            </template>
+          </el-table-column></dilTable
+        >
       </div>
       <div v-show="a == 2">
         <dilTable
           v-bind.sync="second"
           @radio-change="currentRadioChange2"
         ></dilTable>
-      </div>          
+      </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
@@ -55,22 +79,22 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      startTime:null,
-      endTime:null,
-      max:null,
-      disabled:false,
+      startTime: null,
+      endTime: null,
+      max: null,
+      disabled: false,
       //仓库名称
-      warehouseName:null,
+      warehouseName: null,
       //物资名称
       materialName: null,
       //物资编码
-      materialCode:null,
-       // 物资规格
-      materialSpecification:null,
+      materialCode: null,
+      // 物资规格
+      materialSpecification: null,
       // 物资型号
-      materialModel:null,
+      materialModel: null,
       //盘点数量
-      materialNumber:null,
+      materialNumber: null,
       //物资id
       materialId: null,
       //是否需要打开模态窗口
@@ -81,12 +105,15 @@ export default {
       first: {
         requestUrl: "",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       second: {
-          requestUrl: "",
-          selectionType:"radio"
-      }
+        requestUrl: "",
+        selectionType: "radio"
+      },
+      materialTheWeight: 0,
+      actuallyWeight: 0,
+      remark: null
     };
   },
   watch: {
@@ -95,45 +122,147 @@ export default {
         this.input = null;
       }
     },
+    materialNumber() {
+      this.getTheoreticalByInfo();
+    }
   },
   created() {
-      let strTime=this.formatDate(new Date(),"yyyy-MM-dd hh:mm:ss")
-      this.startTime= Date.parse(new Date(strTime));
-      this.endTime=new Date(this.startTime+86400000);
+    let strTime = this.formatDate(new Date(), "yyyy-MM-dd hh:mm:ss");
+    this.startTime = Date.parse(new Date(strTime));
+    this.endTime = new Date(this.startTime + 86400000);
   },
   methods: {
-    formatDate (date, fmt) {
-        if (/(y+)/.test(fmt)) {
-          fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
-        }
-        let o = {
-          'M+': date.getMonth() + 1,
-          'd+': date.getDate(),
-          'h+': 0,
-          'm+': 0,
-          's+': 0
+    deleteInboundMaterial(row) {
+      if (Number(row.quantity) > 0) {
+        this.$confirm("确定删除?继续", "提示", {
+          cancelButtonText: "取消",
+          confirmButtonText: "确定"
+        }).then(() => {
+          console.log(row);
+          this.axios
+            .post(
+              "/api/v1/wms/deleteInboundMaterial?warehouseId=1&materialCode=" +
+                row.materialCode +
+                "&materialSpecification=" +
+                row.materialSpecification +
+                "&materialModel=" +
+                row.materialModel +
+                "&quantity=" +
+                row.quantity
+            )
+            .then(res => {
+              if (res.data.code == 200) {
+                this.$message.success("删除成功");
+                this.first.requestUrl =
+                  "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+                  1 +
+                  "&status=" +
+                  1 +
+                  "&con=" +
+                  "" +
+                  "&startTime=" +
+                  sjTime(this.startTime) +
+                  "&endTime=" +
+                  sjTime(this.endTime) +
+                  "&i=" +
+                  new Date();
+              } else {
+                this.$message.error("删除失败");
+              }
+            });
+        });
+      } else {
+        this.$message.warning("请输入需要删除的物资件数");
+      }
+    },
+    getTheoreticalByInfo() {
+      this.axios
+        .post(
+          "/api/v1/wms/getTheoreticalByInfo?warehouseId=" +
+            1 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&num=" +
+            this.materialNumber +
+            "&status=1" +
+            "&i=" +
+            new Date()
+        )
+        .then(res => {
+          if (res.data.data == -1) {
+            this.$message.error("数量超出");
+            this.materialTheWeight = null;
+          } else {
+            this.materialTheWeight = parseFloat(res.data.data);
+          }
+        });
+    },
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+        );
       }
+      let o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": 0,
+        "m+": 0,
+        "s+": 0
+      };
       for (let k in o) {
         if (new RegExp(`(${k})`).test(fmt)) {
-          let str = o[k] + ''
-          fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : this.padLeftZero(str))
+          let str = o[k] + "";
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : this.padLeftZero(str)
+          );
         }
-            }
-      return fmt
+      }
+      return fmt;
     },
-    padLeftZero (str) {
-        return ('00' + str).substr(str.length)
+    padLeftZero(str) {
+      return ("00" + str).substr(str.length);
     },
     onclick(a) {
       if (a == 1) {
-        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+1+"&status="+1+"&con="+this.input+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          1 +
+          "&status=" +
+          1 +
+          "&con=" +
+          this.input +
+          "&startTime=" +
+          sjTime(this.startTime) +
+          "&endTime=" +
+          sjTime(this.endTime) +
+          "&i=" +
+          new Date();
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
-      if(num==1){
-          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+1+"&status="+1+"&con="+""+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
+      if (num == 1) {
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          1 +
+          "&status=" +
+          1 +
+          "&con=" +
+          "" +
+          "&startTime=" +
+          sjTime(this.startTime) +
+          "&endTime=" +
+          sjTime(this.endTime) +
+          "&i=" +
+          new Date();
       }
     },
     // 返回
@@ -142,7 +271,12 @@ export default {
     },
     currentRadioChange1(selection) {
       console.log(selection);
-      this.materialName = selection.materialName + selection.materialSpecification + '(' + selection.materialModel + ')' ;
+      this.materialName =
+        selection.materialName +
+        selection.materialSpecification +
+        "(" +
+        selection.materialModel +
+        ")";
       this.materialId = selection.materialId;
       this.materialCode = selection.materialCode;
       this.materialSpecification = selection.materialSpecification;
@@ -150,97 +284,121 @@ export default {
       this.max = selection.max;
     },
     currentRadioChange2(selection) {
-      this.warehouseId = selection.warehouseId
-      this.warehouseName = selection.warehouseName
+      this.warehouseId = selection.warehouseId;
+      this.warehouseName = selection.warehouseName;
     },
     // 确认
     onClickConfirm() {
+      if (!isNumber(this.actuallyWeight)) {
+        this.$message.error("实重填写不正确");
+        return;
+      }
       // console.log(this.warehouseId,this.materialCode,this.materialNumber);
-      this.disabled = true
-      this.axios.post("/api/v1/wms/insertReserved?warehouseId=" + 1 + "&materialCode=" + this.materialCode+"&materialSpecification="+this.materialSpecification+"&materialModel="+this.materialModel+ "&quantity=" + this.materialNumber ).then((res) => {
-        console.log(res.data)
+      this.disabled = true;
+      this.axios
+        .post(
+          "/api/v1/wms/insertReserved?warehouseId=" +
+            1 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&quantity=" +
+            this.materialNumber +
+            "&actuallyWeight=" +
+            Number(parseFloat(this.actuallyWeight)) +
+            "&materialTheWeight=" +
+            Number(parseFloat(this.materialTheWeight)) +
+            "&remark=" +
+            this.remark
+        )
+        .then(res => {
+          console.log(res.data);
           if (res.data.code == "200") {
             this.$message({
-              message: "预留成功!",
-              type: "success",
+              message: "入库成功!",
+              type: "success"
             });
-            this.disabled = false
-            this.onClickCancel()
-            this.$router.go(-1)
-          }else if(res.data.code=="201"){
+            this.disabled = false;
+            this.onClickCancel();
+            this.$router.go(-1);
+          } else if (res.data.code == "201") {
             this.$message({
-              message:"预留的数量不正确",
-              type:"faile",
-            })
+              message: "入库的数量不正确",
+              type: "faile"
+            });
+            this.disabled = false;
           }
-          this.$router.go(-1)
+          this.$router.go(-1);
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang="scss" scope>
-.addCheckWarehouse{
-.contractDetails {
-  width: 100%;
-}
-.from {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.warehouse {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  margin-right: 70px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+<style lang="scss" scoped>
+.addCheckWarehouse {
+  .contractDetails {
+    width: 100%;
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .from {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 5px;
+    margin-bottom: 20px;
   }
-}
-.material {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .warehouse {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .material {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.materialNumber {
+  .materialNumber {
     display: flex;
     justify-content: center;
     margin-top: 20px;
     margin-right: 70px;
     .text {
-        display:inline-block;
-        width: 170px;
-        text-align: right;
+      display: inline-block;
+      width: 170px;
+      text-align: right;
     }
     .input {
-        width: 250px;
-        margin-right: 20px;
+      width: 250px;
+      margin-right: 20px;
     }
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 100px;
+  }
 }
-.button_box {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100px;
-}
-}
-</style>
+</style>

+ 115 - 90
src/views/WMS/components/steel/bar1_steel/bar1_addSteelReserved.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 新增预留转入库作业页面 -->
   <div class="addCheckWarehouse">
-    <page-title>预留转入库作业</page-title>
+    <page-title>入库转预留作业</page-title>
     <div class="material from">
       <span class="text">物资规格型号:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
@@ -39,11 +39,13 @@
           v-bind.sync="second"
           @radio-change="currentRadioChange2"
         ></dilTable>
-      </div>          
+      </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
@@ -55,20 +57,20 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      max:null,
-      disabled:false,
+      max: null,
+      disabled: false,
       //仓库名称
-      warehouseName:null,
+      warehouseName: null,
       //物资名称
       materialName: null,
       //物资编码
-      materialCode:null,
-       // 物资规格
-      materialSpecification:null,
+      materialCode: null,
+      // 物资规格
+      materialSpecification: null,
       // 物资型号
-      materialModel:null,
+      materialModel: null,
       //盘点数量
-      materialNumber:null,
+      materialNumber: null,
       //物资id
       materialId: null,
       //是否需要打开模态窗口
@@ -79,11 +81,11 @@ export default {
       first: {
         requestUrl: "",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       second: {
-          requestUrl: "",
-          selectionType:"radio"
+        requestUrl: "",
+        selectionType: "radio"
       }
     };
   },
@@ -92,22 +94,32 @@ export default {
       if (!val) {
         this.input = null;
       }
-    },
-  },
-  created() {
-      
+    }
   },
+  created() {},
   methods: {
     onclick(a) {
       if (a == 1) {
-        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+1+"&status="+2+"&con="+this.input
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          1 +
+          "&status=" +
+          2 +
+          "&con=" +
+          this.input;
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
-      if(num==1){
-          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+1+"&status="+2+"&con="+""
+      if (num == 1) {
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          1 +
+          "&status=" +
+          2 +
+          "&con=" +
+          "";
       }
     },
     // 返回
@@ -123,97 +135,110 @@ export default {
       this.max = selection.max;
     },
     currentRadioChange2(selection) {
-      this.warehouseId = selection.warehouseId
-      this.warehouseName = selection.warehouseName
+      this.warehouseId = selection.warehouseId;
+      this.warehouseName = selection.warehouseName;
     },
     // 确认
     onClickConfirm() {
       // console.log(this.warehouseId,this.materialCode,this.materialNumber);
-      this.disabled = true
-      this.axios.post("/api/v1/wms/insertInbounds?warehouseId=" + 1 + "&materialCode=" + this.materialCode+"&materialSpecification="+this.materialSpecification+"&materialModel="+this.materialModel+ "&quantity=" + this.materialNumber ).then((res) => {
-        console.log(res.data)
+      this.disabled = true;
+      this.axios
+        .post(
+          "/api/v1/wms/insertInbounds?warehouseId=" +
+            1 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&quantity=" +
+            this.materialNumber
+        )
+        .then(res => {
+          console.log(res.data);
           if (res.data.code == "200") {
             this.$message({
-              message: "入库成功!",
-              type: "success",
+              message: "转预留成功!",
+              type: "success"
             });
-            this.disabled = false
-            this.onClickCancel()
-            this.$router.go(-1)
-          }else if(res.data.code=="201"){
+            this.disabled = false;
+            this.onClickCancel();
+            this.$router.go(-1);
+          } else if (res.data.code == "201") {
             this.$message({
-              message:"入库的数量不正确",
-              type:"faile",
-            })
+              message: "转预留的数量不正确",
+              type: "faile"
+            });
           }
-          this.$router.go(-1)
+          this.$router.go(-1);
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang="scss" scope>
-.addCheckWarehouse{
-.contractDetails {
-  width: 100%;
-}
-.from {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.warehouse {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  margin-right: 70px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+<style lang="scss" scoped>
+.addCheckWarehouse {
+  .contractDetails {
+    width: 100%;
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .from {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 5px;
+    margin-bottom: 20px;
   }
-}
-.material {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .warehouse {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .material {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.materialNumber {
+  .materialNumber {
     display: flex;
     justify-content: center;
     margin-top: 20px;
     margin-right: 70px;
     .text {
-        display:inline-block;
-        width: 170px;
-        text-align: right;
+      display: inline-block;
+      width: 170px;
+      text-align: right;
     }
     .input {
-        width: 250px;
-        margin-right: 20px;
+      width: 250px;
+      margin-right: 20px;
     }
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 100px;
+  }
 }
-.button_box {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100px;
-}
-}
-</style>
+</style>

+ 135 - 70
src/views/WMS/components/steel/bar1_steel/bar1_steel_inbound.vue

@@ -1,28 +1,50 @@
 //入库
 <template>
-  <div class="steel_inbound">
+  <div class="steel_inbound01">
     <div class="sache">
-      <!-- <el-input
-        placeholder="请输入内容"
-        v-model="inputText"
-        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">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" class="btn" @click="onreserved">
-        预留
-      </el-button>
+      <el-form :inline="true">
+        <el-form-item>
+          <span class="text">入库时间:</span>
+          <el-date-picker
+            disabled
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+          <span class="text">至</span>
+          <el-date-picker
+            disabled
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <span class="text">物资类型</span>
+          <el-autocomplete
+            v-model="inputText"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入内容"
+            @select="handleSelect"
+            style="width: 200px;"
+          ></el-autocomplete>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>查询
+          </el-button>
+          <el-button type="primary" class="btn" @click="onreserved">
+            入库
+          </el-button>
+        </el-form-item>
+      </el-form>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options" >
+      <dilTable v-bind.sync="options">
         <!-- <el-table-column fixed="right" label="操作" width="150">
 								<template slot-scope="scope">
 									<el-button type="text" size="mini" @click="inboundDetails(scope)">
@@ -37,60 +59,90 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      inputText:"",
+  data() {
+    return {
+      inputText: "",
       startTime: null,
       endTime: null,
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+1,
+        requestUrl: ""
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-   created(){
+  created() {
     var date = new Date();
-    let dateStr=this.formatDate(date, 'yyyy-MM-dd hh:mm:ss');
-    
-    this.startTime= Date.parse(new Date(dateStr));
-    this.endTime=new Date(this.startTime+86400000);
+    let dateStr = this.formatDate(date, "yyyy-MM-dd hh:mm:ss");
+
+    this.startTime = Date.parse(new Date(dateStr));
+    this.endTime = new Date(this.startTime + 86400000);
 
-    this.options.requestUrl= "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+1+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime) ;
-    this.tableShow=true;
+    this.options.requestUrl =
+      "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" +
+      1 +
+      "&startTime=" +
+      sjTime(this.startTime) +
+      "&endTime=" +
+      sjTime(this.endTime);
+    this.tableShow = true;
   },
-  
-  methods:{
-    formatDate (date, fmt) {
-        if (/(y+)/.test(fmt)) {
-          fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
-        }
-        let o = {
-          'M+': date.getMonth() + 1,
-          'd+': date.getDate(),
-          'h+': 0,
-          'm+': 0,
-          's+': 0
+
+  methods: {
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+        );
       }
+      let o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": 0,
+        "m+": 0,
+        "s+": 0
+      };
       for (let k in o) {
         if (new RegExp(`(${k})`).test(fmt)) {
-          let str = o[k] + ''
-          fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : this.padLeftZero(str))
+          let str = o[k] + "";
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : this.padLeftZero(str)
+          );
         }
-            }
-      return fmt
+      }
+      return fmt;
     },
-    padLeftZero (str) {
-        return ('00' + str).substr(str.length)
+    padLeftZero(str) {
+      return ("00" + str).substr(str.length);
+    },
+    querySearch(queryString, cb) {
+      var restaurants = [
+        { value: "螺纹钢" },
+        { value: "盘螺" },
+        { value: "乱尺" }
+      ];
+      var results = queryString
+        ? restaurants.filter(this.createFilter(queryString))
+        : restaurants;
+      // 调用 callback 返回建议列表的数据
+      cb(results);
+    },
+    createFilter(queryString) {
+      return restaurant => {
+        return (
+          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1
+        );
+      };
     },
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
-    onclick(){
-
+    onclick() {
       let startTime = null;
       let endTime = null;
       if (this.startTime) {
@@ -102,11 +154,22 @@ export default {
       if (startTime && endTime) {
         if (startTime < endTime) {
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+1+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          this.options.requestUrl =
+            "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" +
+            1 +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
+          this.options.requestQuery = {
+            materialNames: this.inputText
+          };
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
-          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }
         } else {
           this.startTime = null;
@@ -114,28 +177,30 @@ export default {
           this.$message.warning("开始时间要比结束时间早");
         }
       } else {
-        this.getRequestUrl()
+        this.getRequestUrl();
       }
     },
     selectionChange(selection) {
       this.options.mapList = selection;
     },
-    onreserved(){
+    onreserved() {
       this.$router.push({
-        path: "/bar1_addSteelInbound",
+        path: "/bar1_addSteelInbound"
       });
     }
   }
-}
+};
 </script>
 
-<style lang="scss" scode>
-.steel_inbound{
-  .sache{
-    height: 5rem;
-    display: flex;
-    align-items: center;
-    padding-left: 1.875rem;
+<style lang="scss" scoped>
+.steel_inbound01 {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
   }
 }
-</style>
+</style>

+ 122 - 97
src/views/WMS/components/steel/bar1_steel/bar1_steel_inboundStatistics.vue

@@ -3,7 +3,11 @@
   <div class="steel_inboundStatistics">
     <div class="sache">
       <span>入库时间:</span>
-      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
       </el-date-picker>
       <span>至</span>
       <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
@@ -17,18 +21,23 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-col :span="3" v-html="'\u2003'"/>
+      <el-col :span="3" v-html="'\u2003'" />
       <span>生产总件数</span>
       <el-input
         placeholder="请输入内容"
         v-model="input3"
-        :disabled="true" class="inputs" style="width:10%">
+        :disabled="true"
+        class="inputs"
+        style="width:10%"
+      >
       </el-input>
       <span>生产总重量</span>
       <el-input
         placeholder="请输入内容"
         v-model="input4"
-        :disabled="true" style="width:10%">
+        :disabled="true"
+        style="width:10%"
+      >
       </el-input>
     </div>
     <div class="table">
@@ -40,51 +49,51 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      rowClassName({row, rowIndex}) {
+  data() {
+    return {
+      rowClassName({ row, rowIndex }) {
         if (rowIndex === 0) {
-          return 'success-row';
+          return "success-row";
         }
-        return '';
+        return "";
       },
-      input1: '',
-      input2: '',
-      input3: '',
-      input4: '',
-      input5: '',
-      inputText:"",
+      input1: "",
+      input2: "",
+      input3: "",
+      input4: "",
+      input5: "",
+      inputText: "",
       startTime: null,
       endTime: null,
       region: "0",
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+1,
+        requestUrl:
+          "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" + 1
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  created(){
-    console.log(this.options.data)
+  created() {
+    console.log(this.options.data);
   },
-  methods:{
-    func(res){
+  methods: {
+    func(res) {
       // console.log(res.list[0])
       // this.input1 = this.input1 + e.furnaceNumber1,
       let num1 = 0;
       let num2 = 0;
       res.list.forEach(e => {
-        console.log(e)
-        console.log(e.count)
-        console.log(e.weight)
-        num1 = num1 + e.count,
-        num2 = num2 + e.weight
+        console.log(e);
+        console.log(e.count);
+        console.log(e.weight);
+        (num1 = num1 + e.count), (num2 = num2 + e.weight);
       });
       this.input3 = num1;
-      this.input4 = num2;
+      this.input4 = (num2 / 1000).toFixed(3);
       // this.input1 = res.list[0].furnaceNumber1,
       // this.input2 = res.list[0].materialName,
       // this.input3 = res.list[0].count,
@@ -95,53 +104,60 @@ export default {
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
     // 获取当前月份的最后一天
-    getdaysinmonth(year,month){
-      month = parseInt(month,10)+1;
+    getdaysinmonth(year, month) {
+      month = parseInt(month, 10) + 1;
       let days = 0;
-      month = month -1;
-      console.log("othermonth"+month)
-      console.log("otheryear"+year);
+      month = month - 1;
+      console.log("othermonth" + month);
+      console.log("otheryear" + year);
       // 根据月份获取对应的天数
-      if(month == 2){
-        days = year % 4 == 0?29:28;
-      }else if(month == 1||month == 3||month == 5||month == 7||month == 8||month == 10||month == 12){
+      if (month == 2) {
+        days = year % 4 == 0 ? 29 : 28;
+      } else if (
+        month == 1 ||
+        month == 3 ||
+        month == 5 ||
+        month == 7 ||
+        month == 8 ||
+        month == 10 ||
+        month == 12
+      ) {
         days = 31;
-      }else{
+      } else {
         days = 30;
       }
-      console.log("otherdays"+days)
+      console.log("otherdays" + days);
       return days;
     },
-    onclick(){
-
+    onclick() {
       let startTime = null;
       let endTime = null;
       // 判断用户有没有班次,有班次则提供默认时间
-      if(this.region!=null){
-        let date =null;
-        let date2 =null;
+      if (this.region != null) {
+        let date = null;
+        let date2 = null;
         let year = null;
-        let month =null;
+        let month = null;
         let day = null;
         let year2 = null;
-        let month2 =null;
+        let month2 = null;
         let day2 = null;
         // 判断当前日期输入框中是否选择了时间,并且开始日期和结束日期是否是同一天
-        if(this.startTime!=null){
-            date = this.startTime;
-            // 判断当前开始时间是标准时间还是字符串时间
-            
-           year = date.getFullYear(); // 年
+        if (this.startTime != null) {
+          date = this.startTime;
+          // 判断当前开始时间是标准时间还是字符串时间
+
+          year = date.getFullYear(); // 年
           month = date.getMonth() + 1; // 月
-          day = date.getDate(); // 日 
+          day = date.getDate(); // 日
         }
-        if(this.endTime!=null){
-           date2 = this.endTime;
-           year2 = date2.getFullYear(); // 年
+        if (this.endTime != null) {
+          date2 = this.endTime;
+          year2 = date2.getFullYear(); // 年
           month2 = date2.getMonth() + 1; // 月
           day2 = date2.getDate(); // 日 // 日
         }
-        if(this.startTime==null&&this.endTime==null){
+        if (this.startTime == null && this.endTime == null) {
           // 获取当前的日期时间
           date = new Date();
           year = date.getFullYear(); // 年
@@ -149,50 +165,53 @@ export default {
           day = date.getDate(); // 日
         }
         // 判断开始日期和结束日期是否是同一天
-        if(!(year==year2&&month==month2&&day==day2)&&(this.startTime!=null||this.endTime!=null)&&this.region==null){
+        if (
+          !(year == year2 && month == month2 && day == day2) &&
+          (this.startTime != null || this.endTime != null) &&
+          this.region == null
+        ) {
           // 当不是同一天的时候,直接弹窗警告
           this.startTime = null;
           this.endTime = null;
           this.$message.warning("开始日期和结束日期不是同一天");
         }
         // 判断当前用户选择的具体班次
-        if(this.region == 0){
-          this.startTime = year+"-"+month+"-"+day+" "+"00:00:00";
+        if (this.region == 0) {
+          this.startTime = year + "-" + month + "-" + day + " " + "00:00:00";
           // 将结束时间加一
-          day =parseInt(day) + 1;
-          this.endTime = year+"-"+month+"-"+day+" "+"00:00:00";
-          
-        }else if(this.region == 1){
-          this.startTime = year+"-"+month+"-"+day+" "+"07:30:00";
-          this.endTime = year+"-"+month+"-"+day+" "+"15:30:00";
-        }else if(this.region == 2){
-          this.startTime = year+"-"+month+"-"+day+" "+"15:30:00";
-          this.endTime = year+"-"+month+"-"+day+" "+"23:30:00";
-        }else if(this.region == 3){
-          this.endTime = year+"-"+month+"-"+day+" "+"07:30:00";
+          day = parseInt(day) + 1;
+          this.endTime = year + "-" + month + "-" + day + " " + "00:00:00";
+        } else if (this.region == 1) {
+          this.startTime = year + "-" + month + "-" + day + " " + "07:30:00";
+          this.endTime = year + "-" + month + "-" + day + " " + "15:30:00";
+        } else if (this.region == 2) {
+          this.startTime = year + "-" + month + "-" + day + " " + "15:30:00";
+          this.endTime = year + "-" + month + "-" + day + " " + "23:30:00";
+        } else if (this.region == 3) {
+          this.endTime = year + "-" + month + "-" + day + " " + "07:30:00";
           // 判断开始日期和结束日期是否跨月份了
-          if(month!=month2){
-            month = parseInt(month)-1
+          if (month != month2) {
+            month = parseInt(month) - 1;
             // 获取前一个月份的最后一天
-            day = this.$options.methods.getdaysinmonth(year,month)
-          }else{
+            day = this.$options.methods.getdaysinmonth(year, month);
+          } else {
             // 将开始时间减一
-            day =parseInt(day)-1;
+            day = parseInt(day) - 1;
           }
-          this.startTime = year+"-"+month+"-"+day+" "+"23:30:00";
+          this.startTime = year + "-" + month + "-" + day + " " + "23:30:00";
         }
-        this.startTime = new Date(this.startTime)
-        this.endTime = new Date(this.endTime)
-          console.log(this.startTime+"开始时间")
-          console.log(this.endTime+"结束时间")
+        this.startTime = new Date(this.startTime);
+        this.endTime = new Date(this.endTime);
+        console.log(this.startTime + "开始时间");
+        console.log(this.endTime + "结束时间");
         // 将拼接好的日期转换为时间戳
-        startTime = Date.parse(this.startTime)
-        endTime = Date.parse(this.endTime)
-        console.log(startTime+"开始时间2")
-        console.log(endTime+"结束时间2")
-      }else{
+        startTime = Date.parse(this.startTime);
+        endTime = Date.parse(this.endTime);
+        console.log(startTime + "开始时间2");
+        console.log(endTime + "结束时间2");
+      } else {
         if (this.startTime) {
-        startTime = sjTime(this.startTime);
+          startTime = sjTime(this.startTime);
         }
         if (this.endTime) {
           endTime = sjTime(this.endTime);
@@ -201,11 +220,19 @@ export default {
       if (startTime && endTime) {
         if (startTime < endTime) {
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+1+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          this.options.requestUrl =
+            "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" +
+            1 +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
-          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }
         } else {
           this.startTime = null;
@@ -213,19 +240,19 @@ export default {
           this.$message.warning("开始时间要比结束时间早");
         }
       } else {
-        this.getRequestUrl()
+        this.getRequestUrl();
       }
     },
     selectionChange(selection) {
       this.options.mapList = selection;
-    },
+    }
   }
-}
+};
 </script>
 
 <style lang="scss" scoped>
 .steel_inboundStatistics {
-  .sache{
+  .sache {
     height: 5rem;
     display: flex;
     align-items: center;
@@ -241,8 +268,6 @@ export default {
     display: flex;
     justify-content: center;
     align-items: center;
-
   }
 }
-
-</style>
+</style>

+ 28 - 21
src/views/WMS/components/steel/bar1_steel/bar1_steel_reserved.vue

@@ -5,9 +5,11 @@
       <el-input
         placeholder="请输入内容"
         v-model="inputText"
-        clearable>
+        clearable
+        style="width:250px"
+      >
       </el-input>
-      
+
       <!-- <span>入库时间:</span>
       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
@@ -18,11 +20,11 @@
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" class="btn" @click="onreserved">
-        入库
+        预留
       </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options" >
+      <dilTable v-bind.sync="options">
         <!-- <el-table-column fixed="right" label="操作" width="150">
 								<template slot-scope="scope">
 									<el-button type="text" size="mini" @click="inboundDetails(scope)">
@@ -37,47 +39,52 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      inputText:"",
+  data() {
+    return {
+      inputText: "",
       startTime: null,
       endTime: null,
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId="+1,
+        requestUrl:
+          "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId=" + 1
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  methods:{
+  methods: {
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
-    onclick(){
-      this.options.requestUrl= "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId="+1+"&con="+this.inputText;
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId=" +
+        1 +
+        "&con=" +
+        this.inputText;
     },
     selectionChange(selection) {
       this.options.mapList = selection;
     },
-    onreserved(){
+    onreserved() {
       this.$router.push({
-        path: "/bar1_addSteelReserved",
+        path: "/bar1_addSteelReserved"
       });
     }
   }
-}
+};
 </script>
 
 <style lang="scss" scode>
-.steel_inbound{
-  .sache{
+.steel_inbound {
+  .sache {
     height: 5rem;
     display: flex;
     align-items: center;
     padding-left: 1.875rem;
   }
 }
-</style>
+</style>

+ 102 - 0
src/views/WMS/components/steel/bar1_steel/inboundEas01.vue

@@ -0,0 +1,102 @@
+<template>
+  <div class="steel_inbound_real">
+    <div class="sache">
+      <span class="text">入库时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable
+        v-bind.sync="options"
+        ref="table"
+        :showSummaryList="showSummaryList"
+        :isshowSummary="true"
+      >
+        <el-table-column label="操作" width="120px">
+          <template slot-scope="scope">
+            <el-button type="text" @click="crtlZ(scope.row)">撤销</el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+  </div>
+</template>
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+export default {
+  data() {
+    return {
+      inputText: "",
+      startTime: null,
+      endTime: null,
+      region: "0",
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=" + 1
+        // selectionType: "select",
+        // mapList: [],
+      },
+      showSummaryList: ["theroticalWeight", "materialNum", "actuallyWeight"]
+    };
+  },
+  methods: {
+    // inboundDetails(scope){
+    //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
+    // }
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      this.options.requestUrl =
+        "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=1&startTime=" +
+        startTime +
+        "&endTime=" +
+        endTime +
+        "&i=" +
+        new Date();
+    },
+    crtlZ(row) {
+      console.log(row.inboundEasId);
+      this.axios
+        .post("/api/v1/wms/reduceInboundEas?inboundEasId=" + row.inboundEasId)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("撤销成功");
+          } else {
+            this.$message.error("撤销失败");
+          }
+          this.options.requestUrl =
+            "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=1" +
+            "&i=" +
+            new Date();
+        });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.steel_inbound_real {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+}
+</style>

+ 271 - 115
src/views/WMS/components/steel/bar2_steel/bar2_addSteelInbound.vue

@@ -1,19 +1,31 @@
 <template>
   <!-- 新增入库转预留作业页面 -->
   <div class="addCheckWarehouse">
-    <page-title>入库转预留作业</page-title>
+    <page-title>预留转入库作业</page-title>
     <div class="material from">
       <span class="text">物资规格型号:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
       <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
     </div>
     <div class="materialNumber from">
-      <span class="text">最大预留件数:</span>
+      <span class="text">最大入库件数:</span>
       <el-input class="input" v-model="max" disabled> </el-input>
     </div>
     <div class="materialNumber from">
       <span class="text">件数:</span>
-      <el-input class="input" v-model="materialNumber"> </el-input>
+      <el-input class="input" v-model.lazy="materialNumber"> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">理重(磅重)</span>
+      <el-input class="input" v-model="materialTheWeight" disabled> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">实重</span>
+      <el-input class="input" v-model="actuallyWeight"> </el-input>
+    </div>
+    <div class="materialNumber from">
+      <span class="text">备注</span>
+      <el-input class="input" v-model="remark"> </el-input>
     </div>
     <!-- 模态窗口 -->
     <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
@@ -29,21 +41,33 @@
         </el-button>
       </div>
       <div v-show="a == 1">
-        <dilTable
-          v-bind.sync="first"
-          @radio-change="currentRadioChange1"
-        ></dilTable>
+        <dilTable v-bind.sync="first" @radio-change="currentRadioChange1">
+          <el-table-column label="操作" width="140px">
+            <template slot-scope="scope">
+              <el-input v-model.number="scope.row.quantity" style="width:60px">
+              </el-input>
+              <el-button
+                type="text"
+                size="mini"
+                @click="deleteInboundMaterial(scope.row)"
+                >删除</el-button
+              >
+            </template>
+          </el-table-column></dilTable
+        >
       </div>
       <div v-show="a == 2">
         <dilTable
           v-bind.sync="second"
           @radio-change="currentRadioChange2"
         ></dilTable>
-      </div>          
+      </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
@@ -55,22 +79,22 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      startTime:null,
-      endTime:null,
-      max:null,
-      disabled:false,
+      startTime: null,
+      endTime: null,
+      max: null,
+      disabled: false,
       //仓库名称
-      warehouseName:null,
+      warehouseName: null,
       //物资名称
       materialName: null,
       //物资编码
-      materialCode:null,
-       // 物资规格
-      materialSpecification:null,
+      materialCode: null,
+      // 物资规格
+      materialSpecification: null,
       // 物资型号
-      materialModel:null,
+      materialModel: null,
       //盘点数量
-      materialNumber:null,
+      materialNumber: null,
       //物资id
       materialId: null,
       //是否需要打开模态窗口
@@ -81,12 +105,15 @@ export default {
       first: {
         requestUrl: "",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       second: {
-          requestUrl: "",
-          selectionType:"radio"
-      }
+        requestUrl: "",
+        selectionType: "radio"
+      },
+      materialTheWeight: 0,
+      actuallyWeight: 0,
+      remark: null
     };
   },
   watch: {
@@ -95,45 +122,145 @@ export default {
         this.input = null;
       }
     },
+    materialNumber() {
+      this.getTheoreticalByInfo();
+    }
   },
   created() {
-      let strTime=this.formatDate(new Date(),"yyyy-MM-dd hh:mm:ss")
-      this.startTime= Date.parse(new Date(strTime));
-      this.endTime=new Date(this.startTime+86400000);
+    let strTime = this.formatDate(new Date(), "yyyy-MM-dd hh:mm:ss");
+    this.startTime = Date.parse(new Date(strTime));
+    this.endTime = new Date(this.startTime + 86400000);
   },
   methods: {
-    formatDate (date, fmt) {
-        if (/(y+)/.test(fmt)) {
-          fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
-        }
-        let o = {
-          'M+': date.getMonth() + 1,
-          'd+': date.getDate(),
-          'h+': 0,
-          'm+': 0,
-          's+': 0
+    deleteInboundMaterial(row) {
+      if (Number(row.quantity) > 0) {
+        this.$confirm("确定删除?继续", "提示", {
+          cancelButtonText: "取消",
+          confirmButtonText: "确定"
+        }).then(() => {
+          console.log(row);
+          this.axios
+            .post(
+              "/api/v1/wms/deleteInboundMaterial?warehouseId=2&materialCode=" +
+                row.materialCode +
+                "&materialSpecification=" +
+                row.materialSpecification +
+                "&materialModel=" +
+                row.materialModel +
+                "&quantity=" +
+                row.quantity
+            )
+            .then(res => {
+              if (res.data.code == 200) {
+                this.$message.success("删除成功");
+                this.first.requestUrl =
+                  "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+                  2 +
+                  "&status=" +
+                  1 +
+                  "&con=" +
+                  "" +
+                  "&startTime=" +
+                  sjTime(this.startTime) +
+                  "&endTime=" +
+                  sjTime(this.endTime) +
+                  "&i=" +
+                  new Date();
+              } else {
+                this.$message.error("删除失败");
+              }
+            });
+        });
+      } else {
+        this.$message.warning("请输入需要删除的物资件数");
+      }
+    },
+    getTheoreticalByInfo() {
+      this.axios
+        .post(
+          "/api/v1/wms/getTheoreticalByInfo?warehouseId=" +
+            2 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&num=" +
+            this.materialNumber +
+            "&status=1"
+        )
+        .then(res => {
+          if (res.data.data == -1) {
+            this.$message.error("数量超出");
+            this.materialTheWeight = null;
+          } else {
+            this.materialTheWeight = parseFloat(res.data.data);
+          }
+        });
+    },
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+        );
       }
+      let o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": 0,
+        "m+": 0,
+        "s+": 0
+      };
       for (let k in o) {
         if (new RegExp(`(${k})`).test(fmt)) {
-          let str = o[k] + ''
-          fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : this.padLeftZero(str))
+          let str = o[k] + "";
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : this.padLeftZero(str)
+          );
         }
-            }
-      return fmt
+      }
+      return fmt;
     },
-    padLeftZero (str) {
-        return ('00' + str).substr(str.length)
+    padLeftZero(str) {
+      return ("00" + str).substr(str.length);
     },
     onclick(a) {
       if (a == 1) {
-        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+2+"&status="+1+"&con="+this.input+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          2 +
+          "&status=" +
+          1 +
+          "&con=" +
+          this.input +
+          "&startTime=" +
+          sjTime(this.startTime) +
+          "&endTime=" +
+          sjTime(this.endTime) +
+          "&i=" +
+          new Date();
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
-      if(num==1){
-          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+2+"&status="+1+"&con="+""+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime)
+      if (num == 1) {
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          2 +
+          "&status=" +
+          1 +
+          "&con=" +
+          "" +
+          "&startTime=" +
+          sjTime(this.startTime) +
+          "&endTime=" +
+          sjTime(this.endTime) +
+          "&i=" +
+          new Date();
       }
     },
     // 返回
@@ -142,7 +269,12 @@ export default {
     },
     currentRadioChange1(selection) {
       console.log(selection);
-      this.materialName = selection.materialName + selection.materialSpecification + '(' + selection.materialModel + ')' ;
+      this.materialName =
+        selection.materialName +
+        selection.materialSpecification +
+        "(" +
+        selection.materialModel +
+        ")";
       this.materialId = selection.materialId;
       this.materialCode = selection.materialCode;
       this.materialSpecification = selection.materialSpecification;
@@ -150,97 +282,121 @@ export default {
       this.max = selection.max;
     },
     currentRadioChange2(selection) {
-      this.warehouseId = selection.warehouseId
-      this.warehouseName = selection.warehouseName
+      this.warehouseId = selection.warehouseId;
+      this.warehouseName = selection.warehouseName;
     },
     // 确认
     onClickConfirm() {
       // console.log(this.warehouseId,this.materialCode,this.materialNumber);
-      this.disabled = true
-      this.axios.post("/api/v1/wms/insertReserved?warehouseId=" + 2 + "&materialCode=" + this.materialCode+"&materialSpecification="+this.materialSpecification+"&materialModel="+this.materialModel+ "&quantity=" + this.materialNumber ).then((res) => {
-        console.log(res.data)
+      if (!isNumber(this.actuallyWeight)) {
+        this.$message.error("实重填写不正确");
+        return;
+      }
+      this.disabled = true;
+      this.axios
+        .post(
+          "/api/v1/wms/insertReserved?warehouseId=" +
+            2 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&quantity=" +
+            this.materialNumber +
+            "&actuallyWeight=" +
+            Number(parseFloat(this.actuallyWeight)) +
+            "&materialTheWeight=" +
+            Number(parseFloat(this.materialTheWeight)) +
+            "&remark=" +
+            this.remark
+        )
+        .then(res => {
+          console.log(res.data);
           if (res.data.code == "200") {
             this.$message({
-              message: "预留成功!",
-              type: "success",
+              message: "入库成功!",
+              type: "success"
             });
-            this.disabled = false
-            this.onClickCancel()
-            this.$router.go(-1)
-          }else if(res.data.code=="201"){
+            this.disabled = false;
+            this.onClickCancel();
+            this.$router.go(-1);
+          } else if (res.data.code == "201") {
             this.$message({
-              message:"预留的数量不正确",
-              type:"faile",
-            })
+              message: "入库的数量不正确",
+              type: "faile"
+            });
+            this.disabled = false;
           }
-          this.$router.go(-1)
+          this.$router.go(-1);
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang="scss" scope>
-.addCheckWarehouse{
-.contractDetails {
-  width: 100%;
-}
-.from {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.warehouse {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  margin-right: 70px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+<style lang="scss" scoped>
+.addCheckWarehouse {
+  .contractDetails {
+    width: 100%;
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .from {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 5px;
+    margin-bottom: 20px;
   }
-}
-.material {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .warehouse {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .material {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.materialNumber {
+  .materialNumber {
     display: flex;
     justify-content: center;
     margin-top: 20px;
     margin-right: 70px;
     .text {
-        display:inline-block;
-        width: 170px;
-        text-align: right;
+      display: inline-block;
+      width: 170px;
+      text-align: right;
     }
     .input {
-        width: 250px;
-        margin-right: 20px;
+      width: 250px;
+      margin-right: 20px;
     }
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 100px;
+  }
 }
-.button_box {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100px;
-}
-}
-</style>
+</style>

+ 121 - 91
src/views/WMS/components/steel/bar2_steel/bar2_addSteelReserved.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 新增预留转入库作业页面 -->
   <div class="addCheckWarehouse">
-    <page-title>预留转入库作业</page-title>
+    <page-title>入库转预留作业</page-title>
     <div class="material from">
       <span class="text">物资规格型号:</span>
       <el-input class="input" v-model="materialName" disabled> </el-input>
@@ -39,11 +39,13 @@
           v-bind.sync="second"
           @radio-change="currentRadioChange2"
         ></dilTable>
-      </div>          
+      </div>
     </el-drawer>
     <div class="button_box">
       <el-button @click="onClickCancel">返回</el-button>
-      <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
+      <el-button type="primary" @click="onClickConfirm" :disabled="disabled"
+        >确认</el-button
+      >
     </div>
   </div>
 </template>
@@ -55,20 +57,20 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      max:null,
-      disabled:false,
+      max: null,
+      disabled: false,
       //仓库名称
-      warehouseName:null,
+      warehouseName: null,
       //物资名称
       materialName: null,
       //物资编码
-      materialCode:null,
-       // 物资规格
-      materialSpecification:null,
+      materialCode: null,
+      // 物资规格
+      materialSpecification: null,
       // 物资型号
-      materialModel:null,
+      materialModel: null,
       //盘点数量
-      materialNumber:null,
+      materialNumber: null,
       //物资id
       materialId: null,
       //是否需要打开模态窗口
@@ -79,11 +81,11 @@ export default {
       first: {
         requestUrl: "",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       second: {
-          requestUrl: "",
-          selectionType:"radio"
+        requestUrl: "",
+        selectionType: "radio"
       }
     };
   },
@@ -92,22 +94,32 @@ export default {
       if (!val) {
         this.input = null;
       }
-    },
-  },
-  created() {
-      
+    }
   },
+  created() {},
   methods: {
     onclick(a) {
       if (a == 1) {
-        this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+2+"&status="+2+"&con="+this.input
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          2 +
+          "&status=" +
+          2 +
+          "&con=" +
+          this.input;
       }
     },
     ondrawer(num) {
       this.drawer = true;
       this.a = num;
-      if(num==1){
-          this.first.requestUrl = "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId="+2+"&status="+2+"&con="+""
+      if (num == 1) {
+        this.first.requestUrl =
+          "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+          2 +
+          "&status=" +
+          2 +
+          "&con=" +
+          "";
       }
     },
     // 返回
@@ -116,7 +128,12 @@ export default {
     },
     currentRadioChange1(selection) {
       console.log(selection);
-      this.materialName = selection.materialName + selection.materialSpecification + '(' + selection.materialModel + ')' ;
+      this.materialName =
+        selection.materialName +
+        selection.materialSpecification +
+        "(" +
+        selection.materialModel +
+        ")";
       this.materialId = selection.materialId;
       this.materialCode = selection.materialCode;
       this.materialSpecification = selection.materialSpecification;
@@ -124,97 +141,110 @@ export default {
       this.max = selection.max;
     },
     currentRadioChange2(selection) {
-      this.warehouseId = selection.warehouseId
-      this.warehouseName = selection.warehouseName
+      this.warehouseId = selection.warehouseId;
+      this.warehouseName = selection.warehouseName;
     },
     // 确认
     onClickConfirm() {
       // console.log(this.warehouseId,this.materialCode,this.materialNumber);
-      this.disabled = true
-      this.axios.post("/api/v1/wms/insertInbounds?warehouseId=" + 2 + "&materialCode=" + this.materialCode+"&materialSpecification="+this.materialSpecification+"&materialModel="+this.materialModel+ "&quantity=" + this.materialNumber ).then((res) => {
-        console.log(res.data)
+      this.disabled = true;
+      this.axios
+        .post(
+          "/api/v1/wms/insertInbounds?warehouseId=" +
+            2 +
+            "&materialCode=" +
+            this.materialCode +
+            "&materialSpecification=" +
+            this.materialSpecification +
+            "&materialModel=" +
+            this.materialModel +
+            "&quantity=" +
+            this.materialNumber
+        )
+        .then(res => {
+          console.log(res.data);
           if (res.data.code == "200") {
             this.$message({
-              message: "入库成功!",
-              type: "success",
+              message: "转预留成功!",
+              type: "success"
             });
-            this.disabled = false
-            this.onClickCancel()
-            this.$router.go(-1)
-          }else if(res.data.code=="201"){
+            this.disabled = false;
+            this.onClickCancel();
+            this.$router.go(-1);
+          } else if (res.data.code == "201") {
             this.$message({
-              message:"入库的数量不正确",
-              type:"faile",
-            })
+              message: "转预留数量不正确",
+              type: "faile"
+            });
           }
-          this.$router.go(-1)
+          this.$router.go(-1);
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang="scss" scope>
-.addCheckWarehouse{
-.contractDetails {
-  width: 100%;
-}
-.from {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.warehouse {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  margin-right: 70px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+<style lang="scss" scoped>
+.addCheckWarehouse {
+  .contractDetails {
+    width: 100%;
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .from {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 5px;
+    margin-bottom: 20px;
   }
-}
-.material {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .warehouse {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    margin-right: 70px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-  .input {
-    width: 250px;
-    margin-right: 20px;
+  .material {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+    .text {
+      display: inline-block;
+      width: 170px;
+      text-align: right;
+    }
+    .input {
+      width: 250px;
+      margin-right: 20px;
+    }
   }
-}
-.materialNumber {
+  .materialNumber {
     display: flex;
     justify-content: center;
     margin-top: 20px;
     margin-right: 70px;
     .text {
-        display:inline-block;
-        width: 170px;
-        text-align: right;
+      display: inline-block;
+      width: 170px;
+      text-align: right;
     }
     .input {
-        width: 250px;
-        margin-right: 20px;
+      width: 250px;
+      margin-right: 20px;
     }
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 100px;
+  }
 }
-.button_box {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100px;
-}
-}
-</style>
+</style>

+ 135 - 78
src/views/WMS/components/steel/bar2_steel/bar2_steel_inbound.vue

@@ -1,96 +1,140 @@
 //入库
 <template>
-  <div class="steel_inbound">
+  <div class="steel_inbound02">
     <div class="sache">
-      <!-- <el-input
-        placeholder="请输入内容"
-        v-model="inputText"
-        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">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" class="btn" @click="onreserved">
-        预留
-      </el-button>
+      <el-form :inline="true">
+        <el-form-item>
+          <span class="text">入库时间:</span>
+          <el-date-picker
+            disabled
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+          <span class="text">至</span>
+          <el-date-picker
+            disabled
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <span class="text">物资类型</span>
+          <el-autocomplete
+            v-model="inputText"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入内容"
+            @select="handleSelect"
+            style="width: 200px;"
+          ></el-autocomplete>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>查询
+          </el-button>
+          <el-button type="primary" class="btn" @click="onreserved">
+            入库
+          </el-button>
+        </el-form-item>
+      </el-form>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options" >
-        <!-- <el-table-column fixed="right" label="操作" width="150">
-								<template slot-scope="scope">
-									<el-button type="text" size="mini" @click="inboundDetails(scope)">
-										详情
-									</el-button>
-								</template>
-				</el-table-column> -->
-      </dilTable>
+      <dilTable v-bind.sync="options"> </dilTable>
     </div>
   </div>
 </template>
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      inputText:"",
+  data() {
+    return {
+      inputText: "",
       startTime: null,
       endTime: null,
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+2,
+        requestUrl: ""
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  created(){
+  created() {
     var date = new Date();
-    let dateStr=this.formatDate(date, 'yyyy-MM-dd hh:mm:ss');
-    
-    this.startTime= Date.parse(new Date(dateStr));
-    this.endTime=new Date(this.startTime+86400000);
+    let dateStr = this.formatDate(date, "yyyy-MM-dd hh:mm:ss");
+
+    this.startTime = Date.parse(new Date(dateStr));
+    this.endTime = new Date(this.startTime + 86400000);
 
-    this.options.requestUrl= "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+2+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime) ;
-    this.tableShow=true;
+    this.options.requestUrl =
+      "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" +
+      2 +
+      "&startTime=" +
+      sjTime(this.startTime) +
+      "&endTime=" +
+      sjTime(this.endTime);
+    this.tableShow = true;
   },
-  
-  methods:{
-    formatDate (date, fmt) {
-        if (/(y+)/.test(fmt)) {
-          fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
-        }
-        let o = {
-          'M+': date.getMonth() + 1,
-          'd+': date.getDate(),
-          'h+': 0,
-          'm+': 0,
-          's+': 0
+
+  methods: {
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+        );
       }
+      let o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": 0,
+        "m+": 0,
+        "s+": 0
+      };
       for (let k in o) {
         if (new RegExp(`(${k})`).test(fmt)) {
-          let str = o[k] + ''
-          fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : this.padLeftZero(str))
+          let str = o[k] + "";
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : this.padLeftZero(str)
+          );
         }
-            }
-      return fmt
+      }
+      return fmt;
     },
-    padLeftZero (str) {
-        return ('00' + str).substr(str.length)
+    padLeftZero(str) {
+      return ("00" + str).substr(str.length);
+    },
+    querySearch(queryString, cb) {
+      var restaurants = [
+        { value: "螺纹钢" },
+        { value: "盘螺" },
+        { value: "乱尺" }
+      ];
+      var results = queryString
+        ? restaurants.filter(this.createFilter(queryString))
+        : restaurants;
+      // 调用 callback 返回建议列表的数据
+      cb(results);
+    },
+    createFilter(queryString) {
+      return restaurant => {
+        return (
+          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1
+        );
+      };
     },
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
-    onclick(){
-
+    onclick() {
       let startTime = null;
       let endTime = null;
       if (this.startTime) {
@@ -102,11 +146,22 @@ export default {
       if (startTime && endTime) {
         if (startTime < endTime) {
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+2+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          this.options.requestUrl =
+            "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" +
+            2 +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
+          this.options.requestQuery = {
+            materialNames: this.inputText
+          };
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
-          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResult?apiId=371&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }
         } else {
           this.startTime = null;
@@ -114,28 +169,30 @@ export default {
           this.$message.warning("开始时间要比结束时间早");
         }
       } else {
-        this.getRequestUrl()
+        this.getRequestUrl();
       }
     },
     selectionChange(selection) {
       this.options.mapList = selection;
     },
-    onreserved(){
+    onreserved() {
       this.$router.push({
-        path: "/bar2_addSteelInbound",
+        path: "/bar2_addSteelInbound"
       });
     }
   }
-}
+};
 </script>
 
-<style lang="scss" scode>
-.steel_inbound{
-  .sache{
-    height: 5rem;
-    display: flex;
-    align-items: center;
-    padding-left: 1.875rem;
+<style lang="scss" scoped>
+.steel_inbound02 {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
   }
 }
-</style>
+</style>

+ 122 - 97
src/views/WMS/components/steel/bar2_steel/bar2_steel_inboundStatistics.vue

@@ -3,7 +3,11 @@
   <div class="steel_inboundStatistics">
     <div class="sache">
       <span>入库时间:</span>
-      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
       </el-date-picker>
       <span>至</span>
       <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
@@ -17,18 +21,23 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-col :span="3" v-html="'\u2003'"/>
+      <el-col :span="3" v-html="'\u2003'" />
       <span>生产总件数</span>
       <el-input
         placeholder="请输入内容"
         v-model="input3"
-        :disabled="true" class="inputs" style="width:10%">
+        :disabled="true"
+        class="inputs"
+        style="width:10%"
+      >
       </el-input>
       <span>生产总重量</span>
       <el-input
         placeholder="请输入内容"
         v-model="input4"
-        :disabled="true" style="width:10%">
+        :disabled="true"
+        style="width:10%"
+      >
       </el-input>
     </div>
     <div class="table">
@@ -40,51 +49,51 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      rowClassName({row, rowIndex}) {
+  data() {
+    return {
+      rowClassName({ row, rowIndex }) {
         if (rowIndex === 0) {
-          return 'success-row';
+          return "success-row";
         }
-        return '';
+        return "";
       },
-      input1: '',
-      input2: '',
-      input3: '',
-      input4: '',
-      input5: '',
-      inputText:"",
+      input1: "",
+      input2: "",
+      input3: "",
+      input4: "",
+      input5: "",
+      inputText: "",
       startTime: null,
       endTime: null,
       region: "0",
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+2,
+        requestUrl:
+          "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" + 2
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  created(){
-    console.log(this.options.data)
+  created() {
+    console.log(this.options.data);
   },
-  methods:{
-    func(res){
+  methods: {
+    func(res) {
       // console.log(res.list[0])
       // this.input1 = this.input1 + e.furnaceNumber1,
       let num1 = 0;
       let num2 = 0;
       res.list.forEach(e => {
-        console.log(e)
-        console.log(e.count)
-        console.log(e.weight)
-        num1 = num1 + e.count,
-        num2 = num2 + e.weight
+        console.log(e);
+        console.log(e.count);
+        console.log(e.weight);
+        (num1 = num1 + e.count), (num2 = num2 + e.weight);
       });
       this.input3 = num1;
-      this.input4 = num2;
+      this.input4 = (num2 / 1000).toFixed(3);
       // this.input1 = res.list[0].furnaceNumber1,
       // this.input2 = res.list[0].materialName,
       // this.input3 = res.list[0].count,
@@ -95,53 +104,60 @@ export default {
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
     // 获取当前月份的最后一天
-    getdaysinmonth(year,month){
-      month = parseInt(month,10)+1;
+    getdaysinmonth(year, month) {
+      month = parseInt(month, 10) + 1;
       let days = 0;
-      month = month -1;
-      console.log("othermonth"+month)
-      console.log("otheryear"+year);
+      month = month - 1;
+      console.log("othermonth" + month);
+      console.log("otheryear" + year);
       // 根据月份获取对应的天数
-      if(month == 2){
-        days = year % 4 == 0?29:28;
-      }else if(month == 1||month == 3||month == 5||month == 7||month == 8||month == 10||month == 12){
+      if (month == 2) {
+        days = year % 4 == 0 ? 29 : 28;
+      } else if (
+        month == 1 ||
+        month == 3 ||
+        month == 5 ||
+        month == 7 ||
+        month == 8 ||
+        month == 10 ||
+        month == 12
+      ) {
         days = 31;
-      }else{
+      } else {
         days = 30;
       }
-      console.log("otherdays"+days)
+      console.log("otherdays" + days);
       return days;
     },
-    onclick(){
-
+    onclick() {
       let startTime = null;
       let endTime = null;
       // 判断用户有没有班次,有班次则提供默认时间
-      if(this.region!=null){
-        let date =null;
-        let date2 =null;
+      if (this.region != null) {
+        let date = null;
+        let date2 = null;
         let year = null;
-        let month =null;
+        let month = null;
         let day = null;
         let year2 = null;
-        let month2 =null;
+        let month2 = null;
         let day2 = null;
         // 判断当前日期输入框中是否选择了时间,并且开始日期和结束日期是否是同一天
-        if(this.startTime!=null){
-            date = this.startTime;
-            // 判断当前开始时间是标准时间还是字符串时间
-            
-           year = date.getFullYear(); // 年
+        if (this.startTime != null) {
+          date = this.startTime;
+          // 判断当前开始时间是标准时间还是字符串时间
+
+          year = date.getFullYear(); // 年
           month = date.getMonth() + 1; // 月
-          day = date.getDate(); // 日 
+          day = date.getDate(); // 日
         }
-        if(this.endTime!=null){
-           date2 = this.endTime;
-           year2 = date2.getFullYear(); // 年
+        if (this.endTime != null) {
+          date2 = this.endTime;
+          year2 = date2.getFullYear(); // 年
           month2 = date2.getMonth() + 1; // 月
           day2 = date2.getDate(); // 日 // 日
         }
-        if(this.startTime==null&&this.endTime==null){
+        if (this.startTime == null && this.endTime == null) {
           // 获取当前的日期时间
           date = new Date();
           year = date.getFullYear(); // 年
@@ -149,50 +165,53 @@ export default {
           day = date.getDate(); // 日
         }
         // 判断开始日期和结束日期是否是同一天
-        if(!(year==year2&&month==month2&&day==day2)&&(this.startTime!=null||this.endTime!=null)&&this.region==null){
+        if (
+          !(year == year2 && month == month2 && day == day2) &&
+          (this.startTime != null || this.endTime != null) &&
+          this.region == null
+        ) {
           // 当不是同一天的时候,直接弹窗警告
           this.startTime = null;
           this.endTime = null;
           this.$message.warning("开始日期和结束日期不是同一天");
         }
         // 判断当前用户选择的具体班次
-        if(this.region == 0){
-          this.startTime = year+"-"+month+"-"+day+" "+"00:00:00";
+        if (this.region == 0) {
+          this.startTime = year + "-" + month + "-" + day + " " + "00:00:00";
           // 将结束时间加一
-          day =parseInt(day) + 1;
-          this.endTime = year+"-"+month+"-"+day+" "+"00:00:00";
-          
-        }else if(this.region == 1){
-          this.startTime = year+"-"+month+"-"+day+" "+"07:30:00";
-          this.endTime = year+"-"+month+"-"+day+" "+"15:30:00";
-        }else if(this.region == 2){
-          this.startTime = year+"-"+month+"-"+day+" "+"15:30:00";
-          this.endTime = year+"-"+month+"-"+day+" "+"23:30:00";
-        }else if(this.region == 3){
-          this.endTime = year+"-"+month+"-"+day+" "+"07:30:00";
+          day = parseInt(day) + 1;
+          this.endTime = year + "-" + month + "-" + day + " " + "00:00:00";
+        } else if (this.region == 1) {
+          this.startTime = year + "-" + month + "-" + day + " " + "07:30:00";
+          this.endTime = year + "-" + month + "-" + day + " " + "15:30:00";
+        } else if (this.region == 2) {
+          this.startTime = year + "-" + month + "-" + day + " " + "15:30:00";
+          this.endTime = year + "-" + month + "-" + day + " " + "23:30:00";
+        } else if (this.region == 3) {
+          this.endTime = year + "-" + month + "-" + day + " " + "07:30:00";
           // 判断开始日期和结束日期是否跨月份了
-          if(month!=month2){
-            month = parseInt(month)-1
+          if (month != month2) {
+            month = parseInt(month) - 1;
             // 获取前一个月份的最后一天
-            day = this.$options.methods.getdaysinmonth(year,month)
-          }else{
+            day = this.$options.methods.getdaysinmonth(year, month);
+          } else {
             // 将开始时间减一
-            day =parseInt(day)-1;
+            day = parseInt(day) - 1;
           }
-          this.startTime = year+"-"+month+"-"+day+" "+"23:30:00";
+          this.startTime = year + "-" + month + "-" + day + " " + "23:30:00";
         }
-        this.startTime = new Date(this.startTime)
-        this.endTime = new Date(this.endTime)
-          console.log(this.startTime+"开始时间")
-          console.log(this.endTime+"结束时间")
+        this.startTime = new Date(this.startTime);
+        this.endTime = new Date(this.endTime);
+        console.log(this.startTime + "开始时间");
+        console.log(this.endTime + "结束时间");
         // 将拼接好的日期转换为时间戳
-        startTime = Date.parse(this.startTime)
-        endTime = Date.parse(this.endTime)
-        console.log(startTime+"开始时间2")
-        console.log(endTime+"结束时间2")
-      }else{
+        startTime = Date.parse(this.startTime);
+        endTime = Date.parse(this.endTime);
+        console.log(startTime + "开始时间2");
+        console.log(endTime + "结束时间2");
+      } else {
         if (this.startTime) {
-        startTime = sjTime(this.startTime);
+          startTime = sjTime(this.startTime);
         }
         if (this.endTime) {
           endTime = sjTime(this.endTime);
@@ -201,11 +220,19 @@ export default {
       if (startTime && endTime) {
         if (startTime < endTime) {
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+2+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          this.options.requestUrl =
+            "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" +
+            2 +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
-          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }
         } else {
           this.startTime = null;
@@ -213,19 +240,19 @@ export default {
           this.$message.warning("开始时间要比结束时间早");
         }
       } else {
-        this.getRequestUrl()
+        this.getRequestUrl();
       }
     },
     selectionChange(selection) {
       this.options.mapList = selection;
-    },
+    }
   }
-}
+};
 </script>
 
 <style lang="scss" scoped>
 .steel_inboundStatistics {
-  .sache{
+  .sache {
     height: 5rem;
     display: flex;
     align-items: center;
@@ -241,8 +268,6 @@ export default {
     display: flex;
     justify-content: center;
     align-items: center;
-
   }
 }
-
-</style>
+</style>

+ 29 - 22
src/views/WMS/components/steel/bar2_steel/bar2_steel_reserved.vue

@@ -5,9 +5,11 @@
       <el-input
         placeholder="请输入内容"
         v-model="inputText"
-        clearable>
+        clearable
+        style="width:250px"
+      >
       </el-input>
-      
+
       <!-- <span>入库时间:</span>
       <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
@@ -18,11 +20,11 @@
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" class="btn" @click="onreserved">
-        入库
+        预留
       </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options" >
+      <dilTable v-bind.sync="options">
         <!-- <el-table-column fixed="right" label="操作" width="150">
 								<template slot-scope="scope">
 									<el-button type="text" size="mini" @click="inboundDetails(scope)">
@@ -37,47 +39,52 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      inputText:"",
+  data() {
+    return {
+      inputText: "",
       startTime: null,
       endTime: null,
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId="+2,
+        requestUrl:
+          "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId=" + 2
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  methods:{
+  methods: {
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
-    onclick(){
-      this.options.requestUrl= "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId="+2+"&con="+this.inputText;
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId=" +
+        2 +
+        "&con=" +
+        this.inputText;
     },
     selectionChange(selection) {
       this.options.mapList = selection;
     },
-    onreserved(){
+    onreserved() {
       this.$router.push({
-        path: "/bar2_addSteelReserved",
+        path: "/bar2_addSteelReserved"
       });
     }
   }
-}
+};
 </script>
 
-<style lang="scss" scode>
-.steel_inbound{
-  .sache{
+<style lang="scss" scoped>
+.steel_inbound {
+  .sache {
     height: 5rem;
     display: flex;
     align-items: center;
     padding-left: 1.875rem;
   }
 }
-</style>
+</style>

+ 102 - 0
src/views/WMS/components/steel/bar2_steel/inboundEas02.vue

@@ -0,0 +1,102 @@
+<template>
+  <div class="steel_inbound_real">
+    <div class="sache">
+      <span class="text">入库时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable
+        v-bind.sync="options"
+        ref="table"
+        :showSummaryList="showSummaryList"
+        :isshowSummary="true"
+      >
+        <el-table-column label="操作" width="120px">
+          <template slot-scope="scope">
+            <el-button type="text" @click="crtlZ(scope.row)">撤销</el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+  </div>
+</template>
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+export default {
+  data() {
+    return {
+      inputText: "",
+      startTime: null,
+      endTime: null,
+      region: "0",
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=" + 2
+        // selectionType: "select",
+        // mapList: [],
+      },
+      showSummaryList: ["theroticalWeight", "materialNum", "actuallyWeight"]
+    };
+  },
+  methods: {
+    // inboundDetails(scope){
+    //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
+    // }
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      this.options.requestUrl =
+        "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=2&startTime=" +
+        startTime +
+        "&endTime=" +
+        endTime +
+        "&i=" +
+        new Date();
+    },
+    crtlZ(row) {
+      console.log(row.inboundEasId);
+      this.axios
+        .post("/api/v1/wms/reduceInboundEas?inboundEasId=" + row.inboundEasId)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("撤销成功");
+          } else {
+            this.$message.error("撤销失败");
+          }
+          this.options.requestUrl =
+            "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=2" +
+            "&i=" +
+            new Date();
+        });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.steel_inbound_real {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+}
+</style>

+ 103 - 0
src/views/WMS/components/steel/inboundEas03.vue

@@ -0,0 +1,103 @@
+<template>
+  <div class="steel_inbound_real">
+    <div class="sache">
+      <span class="text">入库时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable
+        v-bind.sync="options"
+        ref="table"
+        :showSummaryList="showSummaryList"
+        :isshowSummary="true"
+      >
+        <el-table-column label="操作" width="120px">
+          <template slot-scope="scope"
+            ><el-button type="text" @click="crtlZ(scope.row)"
+              >撤销</el-button
+            ></template
+          >
+        </el-table-column>
+      </dilTable>
+    </div>
+  </div>
+</template>
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+export default {
+  data() {
+    return {
+      inputText: "",
+      startTime: null,
+      endTime: null,
+      region: "0",
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=" + 3
+        // selectionType: "select",
+        // mapList: [],
+      },
+      showSummaryList: ["theroticalWeight", "materialNum", "actuallyWeight"]
+    };
+  },
+  methods: {
+    // inboundDetails(scope){
+    //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
+    // }
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      this.options.requestUrl =
+        "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=3&startTime=" +
+        startTime +
+        "&endTime=" +
+        endTime +
+        "&i=" +
+        new Date();
+    },
+    crtlZ(row) {
+      this.axios
+        .post("/api/v1/wms/reduceInboundEas?inboundEasId=" + row.inboundEasId)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("撤销成功");
+          } else {
+            this.$message.error("撤销失败");
+          }
+          this.options.requestUrl =
+            "/api/v1/wms/getInboundEasInfo?apiId=510&warehouseId=3" +
+            "&i=" +
+            new Date();
+        });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.steel_inbound_real {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+}
+</style>

+ 139 - 116
src/views/WMS/components/steel/steel_inbound.vue

@@ -1,30 +1,54 @@
 //入库转预留
 <template>
-  <div class="steel_inbound">
+  <div class="steel_inbound03">
     <div class="sache">
-      <span class="text">入库时间:</span>
-      <el-date-picker disabled v-model="startTime" type="datetime" placeholder="选择日期">
-      </el-date-picker>
-      <span class="text">至</span>
-      <el-date-picker disabled v-model="endTime" type="datetime" placeholder="选择日期">
-      </el-date-picker>
-      <span class="text">物资类型</span>
-      <el-autocomplete
-      class="inputStyle"
-      v-model="inputText"
-      :fetch-suggestions="querySearch"
-      placeholder="请输入内容"
-      @select="handleSelect"
-    ></el-autocomplete>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" class="btn" @click="onreserved">
-        预留
-      </el-button>
+      <el-form :inline="true">
+        <el-form-item>
+          <span class="text">扫码时间:</span>
+          <el-date-picker
+            disabled
+            v-model="startTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+          <span class="text">至</span>
+          <el-date-picker
+            disabled
+            v-model="endTime"
+            type="datetime"
+            placeholder="选择日期"
+            style="width: 200px;"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <span class="text">物资类型</span>
+          <el-autocomplete
+            v-model="inputText"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入内容"
+            @select="handleSelect"
+            style="width: 200px;"
+          ></el-autocomplete>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" class="btn" @click="onclick">
+            <i class="el-icon-search"></i>查询
+          </el-button>
+          <el-button type="primary" class="btn" @click="onreserved">
+            入库
+          </el-button>
+        </el-form-item>
+      </el-form>
     </div>
     <div class="table">
-      <dilTable v-if="tableShow" :selectionType="selectionType"  v-bind.sync="options" >
+      <dilTable
+        v-if="tableShow"
+        :selectionType="selectionType"
+        v-bind.sync="options"
+      >
       </dilTable>
     </div>
   </div>
@@ -32,77 +56,90 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
 export default {
-  data(){
-    return{
-      tableShow:false,
-      selectionType:"",
-      inputText:"",
+  data() {
+    return {
+      tableShow: false,
+      selectionType: "",
+      inputText: "",
       startTime: null,
       endTime: null,
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+3,
+        requestUrl: ""
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  mounted(){
-
+  mounted() {
     var date = new Date();
-    let dateStr=this.formatDate(date, 'yyyy-MM-dd hh:mm:ss');
-    
-    this.startTime= Date.parse(new Date(dateStr));
-    this.endTime=new Date(this.startTime+86400000);
+    let dateStr = this.formatDate(date, "yyyy-MM-dd hh:mm:ss");
 
-    this.options.requestUrl= "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+3+"&startTime=" + sjTime(this.startTime) + "&endTime=" + sjTime(this.endTime) ;
-    this.tableShow=true;
+    this.startTime = Date.parse(new Date(dateStr));
+    this.endTime = new Date(this.startTime + 86400000);
+
+    this.options.requestUrl =
+      "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" +
+      3 +
+      "&startTime=" +
+      sjTime(this.startTime) +
+      "&endTime=" +
+      sjTime(this.endTime);
+    this.tableShow = true;
   },
-  methods:{
-    formatDate (date, fmt) {
-        if (/(y+)/.test(fmt)) {
-          fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
-        }
-        let o = {
-          'M+': date.getMonth() + 1,
-          'd+': date.getDate(),
-          'h+': 0,
-          'm+': 0,
-          's+': 0
+  methods: {
+    formatDate(date, fmt) {
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(
+          RegExp.$1,
+          (date.getFullYear() + "").substr(4 - RegExp.$1.length)
+        );
       }
+      let o = {
+        "M+": date.getMonth() + 1,
+        "d+": date.getDate(),
+        "h+": 0,
+        "m+": 0,
+        "s+": 0
+      };
       for (let k in o) {
         if (new RegExp(`(${k})`).test(fmt)) {
-          let str = o[k] + ''
-          fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : this.padLeftZero(str))
+          let str = o[k] + "";
+          fmt = fmt.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? str : this.padLeftZero(str)
+          );
         }
-            }
-      return fmt
+      }
+      return fmt;
+    },
+    padLeftZero(str) {
+      return ("00" + str).substr(str.length);
+    },
+    querySearch(queryString, cb) {
+      var restaurants = [
+        { value: "螺纹钢" },
+        { value: "盘螺" },
+        { value: "乱尺" }
+      ];
+      var results = queryString
+        ? restaurants.filter(this.createFilter(queryString))
+        : restaurants;
+      // 调用 callback 返回建议列表的数据
+      cb(results);
     },
-    padLeftZero (str) {
-        return ('00' + str).substr(str.length)
+    createFilter(queryString) {
+      return restaurant => {
+        return (
+          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1
+        );
+      };
     },
-     querySearch(queryString, cb) {
-        var restaurants = [ 
-                            {"value":"螺纹钢"},
-                            {"value":"盘螺"},
-                            {"value":"乱尺"}
-                          ];
-        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
-        // 调用 callback 返回建议列表的数据
-        cb(results);
-      },
-      createFilter(queryString) {
-        return (restaurant) => {
-          return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
-        };
-      },
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
-    onclick(){
-
+    onclick() {
       let startTime = null;
       let endTime = null;
       if (this.startTime) {
@@ -113,10 +150,18 @@ export default {
       }
       if (startTime && endTime) {
         if (startTime < endTime) {
-          this.options.requestUrl = "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId="+3+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
-          this.options.requestQuery={
-            "materialNames":this.inputText
-          }
+          this.options.requestUrl =
+            "/api/v1/wms/getWmsInboundResult?apiId=371&warehouseId=" +
+            3 +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
+          this.options.requestQuery = {
+            materialNames: this.inputText
+          };
           // this.selectionType="select";
         } else {
           this.startTime = null;
@@ -124,7 +169,7 @@ export default {
           this.$message.warning("开始时间要比结束时间早");
         }
       } else {
-         this.$message.warning("没有选择时间段");
+        this.$message.warning("没有选择时间段");
         // this.getRequestUrl()
       }
     },
@@ -132,48 +177,26 @@ export default {
       this.options.mapList = selection;
     },
     handleSelect(item) {
-        console.log(item);
+      console.log(item);
     },
-    onreserved(){
+    onreserved() {
       this.$router.push({
-        path: "/addSteelInbound",
+        path: "/addSteelInbound"
       });
     }
   }
-}
+};
 </script>
 
-<style lang="scss" scode>
-.steel_inbound{
-  margin-top: 30px;
-  margin-left: 20px;
-   
-    .sache{
-      display: flex;
-      margin-bottom: 10px;
-      padding-right: 10px;
-       .inputStyle{
-          width: 200px;
-          margin-right: 5px;
-        margin-left: 5px;
-        }
-      .text {
-        text-align: left;
-        line-height: 40px;
-      }
-      .el-date-editor {
-        margin-right: 5px;
-        margin-left: 5px;
-      }
-      .btn {
-        margin-left: 10px;
-      }
-      .el-select {
-      width: 100%;
-      .el-input__inner {
-        width: 150px;
-      }
-    }
-    }
+<style lang="scss" scoped>
+.steel_inbound03 {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
 }
-</style>
+</style>

+ 145 - 118
src/views/WMS/components/steel/steel_inboundStatistics.vue

@@ -3,7 +3,11 @@
   <div class="steel_inboundStatistics">
     <div class="sache">
       <span class="text">入库时间:</span>
-      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
       </el-date-picker>
       <span class="text1">至</span>
       <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
@@ -17,18 +21,23 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-col :span="3" v-html="'\u2003'"/>
+      <el-col :span="3" v-html="'\u2003'" />
       <span class="text">生产总件数</span>
       <el-input
         placeholder="请输入内容"
         v-model="input3"
-        :disabled="true" class="inputs" style="width:10%">
+        :disabled="true"
+        class="inputs"
+        style="width:10%"
+      >
       </el-input>
       <span class="text">生产总重量</span>
       <el-input
         placeholder="请输入内容"
         v-model="input4"
-        :disabled="true" style="width:10%">
+        :disabled="true"
+        style="width:10%"
+      >
       </el-input>
     </div>
     <div class="table">
@@ -40,51 +49,52 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      rowClassName({row, rowIndex}) {
+  data() {
+    return {
+      rowClassName({ row, rowIndex }) {
         if (rowIndex === 0) {
-          return 'success-row';
+          return "success-row";
         }
-        return '';
+        return "";
       },
-      input1: '',
-      input2: '',
-      input3: '',
-      input4: '',
-      input5: '',
-      inputText:"",
+      input1: "",
+      input2: "",
+      input3: "",
+      input4: "",
+      input5: "",
+      inputText: "",
       startTime: null,
       endTime: null,
       region: "0",
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3,
+        requestUrl:
+          "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" + 3
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  created(){
-    console.log(this.options.data)
+  created() {
+    console.log(this.options.data);
   },
-  methods:{
-    func(res){
+  methods: {
+    func(res) {
       // console.log(res.list[0])
       // this.input1 = this.input1 + e.furnaceNumber1,
       let num1 = 0;
       let num2 = 0;
       res.list.forEach(e => {
-        console.log(e)
-        console.log(e.count)
-        console.log(e.weight)
-        num1 = num1 + e.count,
-        num2 = num2 + e.weight
+        console.log(e);
+        console.log(e.count);
+        console.log(e.weight);
+        num1 = num1 + e.count;
+        num2 = num2 + e.weight;
       });
       this.input3 = num1;
-      this.input4 = num2;
+      this.input4 = (num2 / 1000).toFixed(3);
       // this.input1 = res.list[0].furnaceNumber1,
       // this.input2 = res.list[0].materialName,
       // this.input3 = res.list[0].count,
@@ -95,53 +105,60 @@ export default {
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
     // 获取当前月份的最后一天
-    getdaysinmonth(year,month){
-      month = parseInt(month,10)+1;
+    getdaysinmonth(year, month) {
+      month = parseInt(month, 10) + 1;
       let days = 0;
-      month = month -1;
-      console.log("othermonth"+month)
-      console.log("otheryear"+year);
+      month = month - 1;
+      console.log("othermonth" + month);
+      console.log("otheryear" + year);
       // 根据月份获取对应的天数
-      if(month == 2){
-        days = year % 4 == 0?29:28;
-      }else if(month == 1||month == 3||month == 5||month == 7||month == 8||month == 10||month == 12){
+      if (month == 2) {
+        days = year % 4 == 0 ? 29 : 28;
+      } else if (
+        month == 1 ||
+        month == 3 ||
+        month == 5 ||
+        month == 7 ||
+        month == 8 ||
+        month == 10 ||
+        month == 12
+      ) {
         days = 31;
-      }else{
+      } else {
         days = 30;
       }
-      console.log("otherdays"+days)
+      console.log("otherdays" + days);
       return days;
     },
-    onclick(){
-
+    onclick() {
       let startTime = null;
       let endTime = null;
       // 判断用户有没有班次,有班次则提供默认时间
-      if(this.region!=null){
-        let date =null;
-        let date2 =null;
+      if (this.region != null) {
+        let date = null;
+        let date2 = null;
         let year = null;
-        let month =null;
+        let month = null;
         let day = null;
         let year2 = null;
-        let month2 =null;
+        let month2 = null;
         let day2 = null;
         // 判断当前日期输入框中是否选择了时间,并且开始日期和结束日期是否是同一天
-        if(this.startTime!=null){
-            date = this.startTime;
-            // 判断当前开始时间是标准时间还是字符串时间
-            
-           year = date.getFullYear(); // 年
+        if (this.startTime != null) {
+          date = this.startTime;
+          // 判断当前开始时间是标准时间还是字符串时间
+
+          year = date.getFullYear(); // 年
           month = date.getMonth() + 1; // 月
-          day = date.getDate(); // 日 
+          day = date.getDate(); // 日
         }
-        if(this.endTime!=null){
-           date2 = this.endTime;
-           year2 = date2.getFullYear(); // 年
+        if (this.endTime != null) {
+          date2 = this.endTime;
+          year2 = date2.getFullYear(); // 年
           month2 = date2.getMonth() + 1; // 月
           day2 = date2.getDate(); // 日 // 日
         }
-        if(this.startTime==null&&this.endTime==null){
+        if (this.startTime == null && this.endTime == null) {
           // 获取当前的日期时间
           date = new Date();
           year = date.getFullYear(); // 年
@@ -149,50 +166,53 @@ export default {
           day = date.getDate(); // 日
         }
         // 判断开始日期和结束日期是否是同一天
-        if(!(year==year2&&month==month2&&day==day2)&&(this.startTime!=null||this.endTime!=null)&&this.region==null){
+        if (
+          !(year == year2 && month == month2 && day == day2) &&
+          (this.startTime != null || this.endTime != null) &&
+          this.region == null
+        ) {
           // 当不是同一天的时候,直接弹窗警告
           this.startTime = null;
           this.endTime = null;
           this.$message.warning("开始日期和结束日期不是同一天");
         }
         // 判断当前用户选择的具体班次
-        if(this.region == 0){
-          this.startTime = year+"-"+month+"-"+day+" "+"00:00:00";
+        if (this.region == 0) {
+          this.startTime = year + "-" + month + "-" + day + " " + "00:00:00";
           // 将结束时间加一
-          day =parseInt(day) + 1;
-          this.endTime = year+"-"+month+"-"+day+" "+"00:00:00";
-          
-        }else if(this.region == 1){
-          this.startTime = year+"-"+month+"-"+day+" "+"07:30:00";
-          this.endTime = year+"-"+month+"-"+day+" "+"15:30:00";
-        }else if(this.region == 2){
-          this.startTime = year+"-"+month+"-"+day+" "+"15:30:00";
-          this.endTime = year+"-"+month+"-"+day+" "+"23:30:00";
-        }else if(this.region == 3){
-          this.endTime = year+"-"+month+"-"+day+" "+"07:30:00";
+          day = parseInt(day) + 1;
+          this.endTime = year + "-" + month + "-" + day + " " + "00:00:00";
+        } else if (this.region == 1) {
+          this.startTime = year + "-" + month + "-" + day + " " + "07:30:00";
+          this.endTime = year + "-" + month + "-" + day + " " + "15:30:00";
+        } else if (this.region == 2) {
+          this.startTime = year + "-" + month + "-" + day + " " + "15:30:00";
+          this.endTime = year + "-" + month + "-" + day + " " + "23:30:00";
+        } else if (this.region == 3) {
+          this.endTime = year + "-" + month + "-" + day + " " + "07:30:00";
           // 判断开始日期和结束日期是否跨月份了
-          if(month!=month2){
-            month = parseInt(month)-1
+          if (month != month2) {
+            month = parseInt(month) - 1;
             // 获取前一个月份的最后一天
-            day = this.$options.methods.getdaysinmonth(year,month)
-          }else{
+            day = this.$options.methods.getdaysinmonth(year, month);
+          } else {
             // 将开始时间减一
-            day =parseInt(day)-1;
+            day = parseInt(day) - 1;
           }
-          this.startTime = year+"-"+month+"-"+day+" "+"23:30:00";
+          this.startTime = year + "-" + month + "-" + day + " " + "23:30:00";
         }
-        this.startTime = new Date(this.startTime)
-        this.endTime = new Date(this.endTime)
-          console.log(this.startTime+"开始时间")
-          console.log(this.endTime+"结束时间")
+        this.startTime = new Date(this.startTime);
+        this.endTime = new Date(this.endTime);
+        console.log(this.startTime + "开始时间");
+        console.log(this.endTime + "结束时间");
         // 将拼接好的日期转换为时间戳
-        startTime = Date.parse(this.startTime)
-        endTime = Date.parse(this.endTime)
-        console.log(startTime+"开始时间2")
-        console.log(endTime+"结束时间2")
-      }else{
+        startTime = Date.parse(this.startTime);
+        endTime = Date.parse(this.endTime);
+        console.log(startTime + "开始时间2");
+        console.log(endTime + "结束时间2");
+      } else {
         if (this.startTime) {
-        startTime = sjTime(this.startTime);
+          startTime = sjTime(this.startTime);
         }
         if (this.endTime) {
           endTime = sjTime(this.endTime);
@@ -201,11 +221,19 @@ export default {
       if (startTime && endTime) {
         if (startTime < endTime) {
           // if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          this.options.requestUrl =
+            "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId=" +
+            3 +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
           // }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = "/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }else{
-          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
+          // this.options.requestUrl = '/api/v1/wms/getWmsInboundResultStatistics?apiId=445&warehouseId="+3+"&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
           // }
         } else {
           this.startTime = null;
@@ -216,42 +244,41 @@ export default {
     },
     selectionChange(selection) {
       this.options.mapList = selection;
-    },
+    }
   }
-}
+};
 </script>
 
 <style lang="scss" scoped>
 .steel_inboundStatistics {
-    margin-top: 30px;
-    margin-left: 20px;
-    .sache{
-      display: flex;
-      margin-bottom: 10px;
-      padding-right: 10px;
-      .text {
-        text-align: left;
-        line-height: 40px;
-        width: 70px;
-      }
-      .text1 {
-        text-align: left;
-        line-height: 40px;
-      }
-      .el-date-editor {
-        margin-right: 5px;
-        margin-left: 5px;
-      }
-      .btn {
-        margin-left: 10px;
-      }
-      .el-select {
+  margin-top: 30px;
+  margin-left: 20px;
+  .sache {
+    display: flex;
+    margin-bottom: 10px;
+    padding-right: 10px;
+    .text {
+      text-align: left;
+      line-height: 40px;
+      width: 70px;
+    }
+    .text1 {
+      text-align: left;
+      line-height: 40px;
+    }
+    .el-date-editor {
+      margin-right: 5px;
+      margin-left: 5px;
+    }
+    .btn {
+      margin-left: 10px;
+    }
+    .el-select {
       width: 100%;
       .el-input__inner {
         width: 150px;
       }
     }
-    }
+  }
 }
-
-</style>
+</style>

+ 39 - 38
src/views/WMS/components/steel/steel_reserved.vue

@@ -2,79 +2,80 @@
 <template>
   <div class="steel_inbound">
     <div class="sache">
-      <el-input
-        placeholder="请输入内容"
-        v-model="inputText"
-        clearable>
+      <el-input placeholder="请输入内容" v-model="inputText" 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="onreserved">
-        入库
+        预留
       </el-button>
     </div>
     <div class="table">
-      <dilTable v-bind.sync="options" >
-      </dilTable>
+      <dilTable v-bind.sync="options"> </dilTable>
     </div>
   </div>
 </template>
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
-      inputText:"",
+  data() {
+    return {
+      inputText: "",
       startTime: null,
       endTime: null,
-      options:{
+      options: {
         // first请求数据的地址
-        requestUrl: "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId="+3,
+        requestUrl:
+          "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId=" + 3
         // selectionType: "select",
         // mapList: [],
-      },
-    }
+      }
+    };
   },
-  methods:{
+  methods: {
     // inboundDetails(scope){
     //   	this.$router.push("/inboundDetails/" + scope.row.inboundId)
     // },
-    onclick(){
-      this.options.requestUrl= "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId="+3+"&con="+this.inputText;
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/wms/getWmsReservedResult?apiId=371&warehouseId=" +
+        3 +
+        "&con=" +
+        this.inputText;
     },
     selectionChange(selection) {
       this.options.mapList = selection;
     },
-    onreserved(){
+    onreserved() {
       this.$router.push({
-        path: "/addSteelReserved",
+        path: "/addSteelReserved"
       });
     }
   }
-}
+};
 </script>
 
-<style lang="scss" scope>
-.steel_inbound{
+<style lang="scss" scoped>
+.steel_inbound {
   margin-top: 30px;
   margin-left: 20px;
-    .sache{
-      display: flex;
-      margin-bottom: 10px;
-      padding-right: 10px;
-      .text {
-        text-align: left;
-        line-height: 40px;
-      }
-      .btn {
-        margin-left: 10px;
-      }
-      .el-input {
-        width: 250px;
-      }
+  .sache {
+    display: flex;
+    margin-bottom: 10px;
+    padding-right: 10px;
+    .text {
+      text-align: left;
+      line-height: 40px;
+    }
+    .btn {
+      margin-left: 10px;
     }
+    .el-input {
+      width: 250px;
+    }
+  }
 }
-</style>
+</style>

+ 21 - 0
src/views/WMS/router/index.js

@@ -44,6 +44,7 @@ import addSteelInbound from "../components/steel/addSteelInbound.vue";
 import addSteelReserved from "../components/steel/addSteelReserved.vue";
 import steel_outboundStatistics from "../components/steel/steel_outboundStatistics.vue";
 import steel_inboundStatistics from "../components/steel/steel_inboundStatistics.vue";
+import inboundEas03 from "../components/steel/inboundEas03.vue";
 
 // 一帮库页面配置
 import bar1_addTransfer from "../components/steel/bar1_steel/bar1_addTransfer.vue";
@@ -72,6 +73,7 @@ import bar1_addSteelInbound from "../components/steel/bar1_steel/bar1_addSteelIn
 import bar1_addSteelReserved from "../components/steel/bar1_steel/bar1_addSteelReserved.vue";
 import bar1_steel_inboundStatistics from "../components/steel/bar1_steel/bar1_steel_inboundStatistics.vue";
 import bar1_steel_outboundStatistics from "../components/steel/bar1_steel/bar1_steel_outboundStatistics.vue";
+import inboundEas01 from "../components/steel/bar1_steel/inboundEas01.vue";
 
 // 二棒库路径配置
 import bar2_addTransfer from "../components/steel/bar2_steel/bar2_addTransfer.vue";
@@ -101,6 +103,7 @@ import bar2_addSteelReserved from "../components/steel/bar2_steel/bar2_addSteelR
 import bar2_steel_inboundStatistics from "../components/steel/bar2_steel/bar2_steel_inboundStatistics.vue";
 import bar2_steel_outboundStatistics from "../components/steel/bar2_steel/bar2_steel_outboundStatistics.vue";
 import wmsOrderDetails from "../components/billingOrder/orderDetails.vue";
+import inboundEas02 from "../components/steel/bar2_steel/inboundEas02.vue";
 Vue.use(Router);
 const constantRouterMap = [
   {
@@ -661,6 +664,24 @@ const constantRouterMap = [
         name: "wmsOrderDetails",
         meta: { code: "xtpzgl-yhgl" },
         component: wmsOrderDetails
+      },
+      {
+        path: "inboundEas01",
+        name: "inboundEas01",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inboundEas01
+      },
+      {
+        path: "inboundEas02",
+        name: "inboundEas02",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inboundEas02
+      },
+      {
+        path: "inboundEas03",
+        name: "inboundEas03",
+        meta: { code: "xtpzgl-yhgl" },
+        component: inboundEas03
       }
     ]
   }

+ 13 - 0
src/views/appoint/components/inward/transPrice.vue

@@ -24,6 +24,13 @@
             :isKuang="isKuang"
             @func="func"
           >
+            <el-table-column label="操作" width="120px" fixed="right">
+              <template slot-scope="scope">
+                <el-button type="text" @click="updatePriceMaterial(scope.row)">
+                  修改价格物资
+                </el-button>
+              </template>
+            </el-table-column>
           </dilTable>
         </el-tab-pane>
         <!-- 历史启用 -->
@@ -62,6 +69,12 @@ export default {
     };
   },
   methods: {
+    updatePriceMaterial(row) {
+      // 修改运价
+      // console.log(row);
+      // this.$router.push("/updateTransPrice/" +row);
+      this.$router.push({ name: "updateTransPrice", query:{row:row||undefined}})
+    },
     func() {
       this.loading = false;
       this.isKuang = false;

+ 131 - 0
src/views/appoint/components/inward/updateTransPrice.vue

@@ -0,0 +1,131 @@
+<template>
+  <!-- 修改运价 -->
+  <div id="contractDetails">
+    <page-title>编辑</page-title>
+    <div class="main">
+      <span class="text">修改运价</span>
+      <span class="a"></span>
+    </div>
+    <div class="form">
+      <div class="form_box">
+        <el-form :model="obj" :rules="batchFormRules" label-width="100px" label-position="left">
+          <div class="preview-group">
+            <el-form-item label="运价" prop="priceValue">
+              <el-input v-model="obj.priceValue" placeholder="请输入内容" type="number"></el-input>
+            </el-form-item>
+            <el-form-item label="货物名称" prop="materialNames">
+              <el-input v-model="obj.materialNames" readonly></el-input>
+            </el-form-item>
+            <el-form-item label="执行日期" prop="priceDate">
+              <el-input v-model="obj.priceDate" readonly></el-input>
+            </el-form-item>
+            <el-form-item label="运力类型" prop="capacityTypeName">
+              <el-input v-model="obj.capacityTypeName" readonly></el-input>
+            </el-form-item>
+            <el-form-item label="当前基准油价" prop="oilpriceBase">
+              <el-input v-model="obj.oilpriceBase" readonly></el-input>
+            </el-form-item>
+            <el-form-item label="油品名称" prop="oilTypeName">
+              <el-input v-model="obj.oilTypeName" readonly></el-input>
+            </el-form-item>
+            <el-form-item label="油价变化率阈值" prop="oilpriceChangeThreshold">
+              <el-input v-model="obj.oilpriceChangeThreshold" readonly></el-input>
+            </el-form-item>
+            <el-form-item label="计价单位" prop="type">
+              <el-input v-model="obj.type" readonly></el-input>
+            </el-form-item>
+          </div>
+        </el-form>
+      </div>
+    </div>
+
+    <div class="button-box">
+      <el-button type="primary" @click="onClickConfirm">修改</el-button>
+      <el-button @click="onClickCancel">返回</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "updateTransPrice",
+  data() {
+    return {
+      obj: {},
+      batchFormRules: {
+        priceValue: [{ required: true, message: '运价不能为空', trigger: 'blur' }]
+      }
+    };
+  },
+  mounted() {
+    this.obj=this.$route.query.row;
+  },
+  methods: {
+    // 返回
+    onClickCancel() {
+      this.$router.go(-1);
+    },
+    // 修改
+    onClickConfirm() {
+      if (this.obj.priceValue==''|| this.obj.priceValue == undefined){
+        this.$message.info("修改前请填写运价!")
+          return;
+      }
+
+      let paramsList = {
+        priceId: this.obj.priceId,
+        priceValue: this.obj.priceValue,
+      };
+        this.axios
+          .post(
+            "/api/v1/ams/updateTransPrice",
+            paramsList
+          )
+          .then((res) => {
+            if (res.data.data >=1) {
+              this.$message.success("修改成功!")
+              this.$router.go(-1);
+            }
+          });
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.form {
+  display: flex;
+  .form_box {
+    width: 400px;
+    margin-left: 35%;
+    margin-top: 30px;
+    margin-right: 20px;
+
+    .el-form {
+      .preview-group {
+        .el-form-item {
+          .el-form-item__label {
+            display: inline-block;
+            width: 70px !important;
+          }
+
+          .el-form-item__content {
+            .el-select {
+              width: 250px;
+            }
+
+            .el-input {
+              width: 250px;
+            }
+          }
+        }
+      }
+    }
+  };
+.txt1{
+  display: inline-block;
+  width: 150px;
+  text-align: right;
+};
+}
+</style>

+ 234 - 48
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -110,19 +110,6 @@
         </el-autocomplete>
         <el-button type="primary" @click="ondrawerOut">选择</el-button>
       </el-form-item>
-      <el-form-item>
-        <label class="el-form-item__label" style="width: auto;"
-          >可装货时间</label
-        >
-        <el-date-picker
-          class="textinput3"
-          v-model.number="saleDateOfReceipt"
-          type="datetime"
-          placeholder="选择日期时间"
-          disabled
-        >
-        </el-date-picker>
-      </el-form-item>
       <el-form-item>
         <label
           class="el-form-item__label"
@@ -151,6 +138,19 @@
           placeholder="(非必填)"
         ></el-input>
       </el-form-item>
+      <el-form-item>
+        <label class="el-form-item__label" style="width: auto;"
+          >可装货时间</label
+        >
+        <el-date-picker
+          class="textinput3"
+          v-model.number="saleDateOfReceipt"
+          type="datetime"
+          placeholder="选择日期时间"
+          disabled
+        >
+        </el-date-picker>
+      </el-form-item>
     </el-form>
 
     <div class="button-box">
@@ -166,6 +166,8 @@
         border
         style="width: 100%"
         highlight-current-row
+        ref="materialTableTop"
+        id="table"
       >
         <el-table-column
           v-for="(item, i) in materialTableTop"
@@ -185,6 +187,10 @@
                   class="textinput111"
                   v-model.number="scope.row.orderPlanWeight"
                   placeholder="(必填)"
+                  :id="'input' + scope.$index"
+                  @keyup.up.native="clicks(scope.$index)"
+                  @keyup.down.native="clickx(scope.$index)"
+                  @keyup.enter.native="singleDistribute"
                 ></el-input>
               </template>
               <!-- 米数 -->
@@ -308,12 +314,21 @@
                   disabled
                 >
                 </el-input>
-                <el-button
-                  type="primary"
+                <!--更改-->
+                <i
+                  class="el-icon-edit"
                   @click="changeMaterial(scope.$index)"
+                  style="font-size: 20px"
                   v-if="isCellClick == 1"
-                  >更改</el-button
-                >
+                ></i>
+              </template>
+              <!--规格型号-->
+              <template v-if="item.prop == 'Specification'">
+                <el-input
+                  style="width: 120px"
+                  class="textinput"
+                  v-model.number="scope.row.Specification"
+                ></el-input>
               </template>
               <!-- 物资件数 -->
               <template v-if="item.prop == 'orderPlanWeight'">
@@ -358,12 +373,13 @@
                   disabled
                 >
                 </el-input>
-                <el-button
-                  type="primary"
+                <!--增加-->
+                <i
+                  class="el-icon-folder-add"
                   @click="ondrawer(scope.row, scope.$index)"
                   v-if="isCellClick == 1"
-                  >选择</el-button
-                >
+                  style="font-size: 20px"
+                ></i>
               </template>
               <!-- 收货日期 -->
               <!-- <template v-if="item.prop == 'saleDateOfReceipt'">
@@ -399,7 +415,12 @@
           </template>
         </el-table-column>
         <!-- 操作列 -->
-        <el-table-column fixed="right" label="操作" width="200">
+        <el-table-column
+          fixed="right"
+          label="操作"
+          width="200"
+          v-if="isCellClick == 1"
+        >
           <template slot-scope="scope">
             <el-button
               @click.native.prevent="deleteRow(scope.$index, selectionList)"
@@ -421,7 +442,7 @@
             >
           </template>
         </el-table-column>
-        <el-table-column fixed="right" width="80">
+        <el-table-column fixed="right" width="80" v-if="isCellClick == 1">
           <template slot-scope="scope">
             <el-button
               @click.native.prevent="copyRowfluAll(scope.$index, scope.row)"
@@ -860,6 +881,14 @@ export default {
         {
           values1: "dgsm",
           label1: "四川达钢商贸有限公司"
+        },
+        {
+          values1: "jxjl",
+          label1: "江西久隆贸易有限公司"
+        },
+        {
+          values1: "hnht",
+          label1: "海南瀚途贸易有限公司"
         }
       ],
       values1: "dzgt",
@@ -887,7 +916,8 @@ export default {
         {
           prop: "Specification",
           label: "规格型号",
-          width: "140px"
+          width: "140px",
+          slot: true
         },
         {
           prop: "orderPlanWeight",
@@ -945,7 +975,12 @@ export default {
       //是否忽视收货客户电话字段
       ignoreSaleOrderConsigneeTel: 0,
       restaurants: [],
-      saleAreaId: null
+      saleAreaId: null,
+      isNiTui: 0,
+      datalistindex: 0,
+      temporarylist: [],
+      //原始摘要值
+      remarksPro: null
     };
   },
   created() {
@@ -966,6 +1001,7 @@ export default {
     this.getAllProvince();
     //获取所有的业务员
     this.getAllsaleMan();
+    this.getRemarkDate();
   },
   mounted() {
     if (getCookie("orgCode") == "shouhuokehu") {
@@ -982,7 +1018,10 @@ export default {
             this.axios
               .post("/api/v1/uc/getSaleArea?receiveId=" + this.consigneeId)
               .then(res => {
-                this.remarks = res.data.data;
+                if (res.data.data != null) {
+                  this.remarks = `${this.getRemarkDate()}${res.data.data}`;
+                  this.remarksPro = `${this.getRemarkDate()}${res.data.data}`;
+                }
               });
             this.axios
               .post(
@@ -998,18 +1037,35 @@ export default {
                   place[0].addressTown +
                   place[0].place;
                 this.saleShipperAddressId = place[0].shipperAddressId;
+                this.addressId = place[0].shipperAddressId;
                 this.place1 = place[0].place;
                 this.saleMan = place[0].salerId;
                 this.saleOrderConsigneeTel = place[0].saleOrderConsigneeTel;
+                this.province = place[0].addressProvince;
+                this.city = place[0].addressDistrict;
+                if (this.city) {
+                  this.remarks = `${this.remarksPro},直发${this.city}`;
+                }
+                this.county = place[0].addressTown;
               });
           }
         });
     }
   },
   methods: {
+    //获取当前日期
+    getRemarkDate() {
+      let day = new Date().getDate();
+      let month = new Date().getMonth() + 1;
+      console.log(day);
+      console.log(month);
+      console.log(`${month}.${day}`);
+      return `${month}.${day}`;
+    },
     handleSelectSaleArea(item) {
       this.saleAreaId = item.areaId;
-      this.remarks = item.value;
+      this.remarks = this.getRemarkDate() + item.value;
+      this.remarksPro = this.getRemarkDate() + item.value;
     },
     onclikSaleArea() {
       if (this.saleAreaId == null) {
@@ -1156,6 +1212,7 @@ export default {
         )
         .then(res => {
           this.countyList = res.data.data;
+          this.remarks = this.remarksPro + `,直发${this.city}`;
         });
     },
     //县(区)改变
@@ -1201,6 +1258,15 @@ export default {
     //以上是发货单位边输边查搜索
     //下单客户弹出层
     handleSelectConsignee(item) {
+      this.saleShipperAddressName = null;
+      this.saleShipperAddressId = null;
+      this.addressId = null;
+      this.place1 = null;
+      this.saleMan = null;
+      this.saleOrderConsigneeTel = null;
+      this.province = null;
+      this.city = null;
+      this.county = null;
       this.consigneeName = item.consigneeCompanyName;
       this.consigneeId = item.consigneeId;
       this.isReceiveHaveArea(this.consigneeId);
@@ -1208,7 +1274,10 @@ export default {
       this.axios
         .post("/api/v1/uc/getSaleArea?receiveId=" + this.consigneeId)
         .then(res => {
-          this.remarks = res.data.data;
+          if (res.data.data != null) {
+            this.remarks = this.getRemarkDate() + res.data.data;
+            this.remarksPro = this.getRemarkDate() + res.data.data;
+          }
         });
       this.axios
         .post(
@@ -1229,6 +1298,9 @@ export default {
           this.saleOrderConsigneeTel = place[0].saleOrderConsigneeTel;
           this.province = place[0].addressProvince;
           this.city = place[0].addressDistrict;
+          if (this.city) {
+            this.remarks = `${this.remarksPro},直发${this.city}`;
+          }
           this.county = place[0].addressTown;
         });
     },
@@ -1439,6 +1511,7 @@ export default {
       ).then(() => {
         this.creatArtSingle(singleArr);
       });
+      this.isNiTui = 0;
     },
     async creatArtSingle(singleArr) {
       let i = 0;
@@ -1563,6 +1636,7 @@ export default {
       } else {
         this.addMaterialToSaleOrder();
       }
+      this.isNiTui = 0;
     },
     //添加物资到订单
     addMaterialToSaleOrder() {
@@ -1840,27 +1914,53 @@ export default {
     },
     //收货地址弹出层
     handleSelect1(item) {
-      console.log("获取所有下拉值!");
+      console.log(item);
+      if (this.isNiTui == 1) {
+        this.province = item.province;
+        this.city = item.district;
+        this.county = item.town;
+        this.place1 = item.place;
+        this.addressId = item.shipperAddressId;
+        this.place = item.place;
+      }
     },
     //以下是收货地址边输边查搜索
     querySearch1(queryString, cb) {
-      this.axios
-        .post(
-          "/api/v1/ams/getRealAddressByLike?addressId=" +
-            this.addressId +
-            "&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);
-          }
-        });
+      if (this.addressId != null) {
+        this.axios
+          .post(
+            "/api/v1/ams/getRealAddressByLike?addressId=" +
+              this.addressId +
+              "&index=" +
+              queryString
+          )
+          .then(res => {
+            this.isNiTui = 0;
+            if (res.data.code == "200") {
+              var restaurants = res.data.data;
+              var results = queryString
+                ? restaurants.filter(this.createFilter1(queryString))
+                : restaurants;
+              // 调用 callback 返回建议列表的数据
+              cb(results);
+            }
+          });
+      } else {
+        this.axios
+          .post("/api/v1/uc/getPlaceAndAddress?index=" + queryString)
+          .then(res => {
+            this.isNiTui = 1;
+            if (res.data.code == "200") {
+              console.log(res.data.data);
+              var restaurants = res.data.data;
+              var results = queryString
+                ? restaurants.filter(this.createFilter1(queryString))
+                : restaurants;
+              // 调用 callback 返回建议列表的数据
+              cb(results);
+            }
+          });
+      }
     },
     createFilter1(queryString) {
       return restaurants => {
@@ -1878,6 +1978,20 @@ export default {
     },
     //确定收货地址事件
     addAddressClick() {
+      //不管是外层还是内层都需要修改,如果存在都需要修改收货客户的电话
+      //定义一个正则表达式判断是否有电话
+      var est = /\d{11}/g;
+      var string2 = this.place.match(est);
+      console.log("-----------这是抓取到的数据----------");
+      console.log(string2);
+      if (string2 != null) {
+        for (i = 0; i < string2.length; i++) {
+          var reg = /^1[3456789]\d{9}$/;
+          if (reg.test(string2[i])) {
+            this.saleOrderConsigneeTel = string2;
+          }
+        }
+      }
       if (this.inOrOut % 2 == 0) {
         for (
           var i = this.row.index;
@@ -1931,7 +2045,7 @@ export default {
       }
     },
     // 确定
-    makeSure() {
+    async makeSure() {
       if (this.selectionList.length == 0) {
         this.$message.warning("请先填写具体信息");
         return;
@@ -1943,6 +2057,18 @@ export default {
           i++;
         }
       });
+      let flag = 0;
+      await this.axios
+        .post("/api/v1/ams/queryFormat", this.selectionList)
+        .then(res => {
+          if (res.data.code == "500") {
+            flag = 1;
+          }
+        });
+      if (flag == 1) {
+        this.$message.error("规格型号有问题,请重新输入");
+        return;
+      }
       if (i != 0) {
         this.$message.error("件数必填且请输入正整数");
         return;
@@ -1979,10 +2105,31 @@ export default {
       this.orderMakeSure = true;
     },
     //发送请求
-    sendRequest() {
+    async sendRequest() {
       this.orderMakeSure = false;
       //是否还有件数未填写
       var orderPlanWeightAllFill = 0;
+      //根据规格型号与物资名称获取对应的物资ID||确认规格型号格式是否正确
+      //先把暂存区的数据清空
+      this.temporarylist = [];
+      let flag = 0;
+      await this.axios
+        .post("/api/v1/ams/queryMaterial", this.selectionList)
+        .then(res => {
+          if (res.data.code === "500") {
+            flag = 1;
+          }
+          console.log(res.data.code);
+          //给暂存区的数据赋值
+          this.temporarylist = res.data.data;
+          console.log("以下是查询出来的数据");
+          console.log(res.data.data);
+        });
+      if (flag === 1) {
+        this.$message.error("规格型号不对");
+        return;
+      }
+      this.selectionList = this.temporarylist;
       //初始化maplist
       var mapList = [];
       this.selectionList.forEach(item => {
@@ -2067,6 +2214,45 @@ export default {
           done();
         })
         .catch(_ => {});
+    },
+    //点击事件(上)
+    clicks(index) {
+      console.log(index);
+      console.log(this.materialList);
+      console.log(this.materialList.length - 1);
+      console.log("clicks=e", arguments);
+      if (index == 0) {
+        console.log("向上1");
+        //this.datalistindex=this.materialTableTop.length-1
+        document
+          .getElementById("input" + (this.materialList.length - 1))
+          .focus();
+      } else {
+        console.log("向上2");
+        //this.$refs.materialTableTop.bodyWrapper.scrollTop=index
+        document.getElementById("input" + (index - 1)).focus();
+      }
+    },
+    //点击事件(下)
+    clickx(index) {
+      console.log(index);
+      console.log(this.materialList);
+      console.log(this.materialList.length - 1);
+      if (index == this.materialList.length - 1) {
+        console.log("向下1");
+        document.getElementById("input" + 0).focus();
+      } else {
+        console.log("向下2");
+        //this.datalistindex+=1
+        //this.$refs.materialTableTop.bodyWrapper.scrollTop=(index+1)*height
+        //var tbl=document.getElementById("table").childNodes[0]
+        //tbl.childNodes[len].childNodes[0].childNodes[0].focus()children[3]
+        //const rowlist=this.$refs.materialTableTop.$el.children[3].children[1].children[0]
+        //.children[1].children[len].children[3].children[0].children[0].children[0].focus()
+        //console.log(rowlist)
+        var nextInput = document.getElementById("input" + (index + 1));
+        nextInput.focus();
+      }
     }
   }
 };

+ 280 - 38
src/views/appoint/components/saleContract/editSaleOrder.vue

@@ -96,27 +96,19 @@
     <el-form :inline="true" style="margin-top: 1rem;">
       <el-form-item>
         <label class="el-form-item__label" style="width: auto;">收货地址</label>
-        <el-input
-          style="width: 400px"
+        <el-autocomplete
+          style="width:400px"
           v-model="saleShipperAddressName"
-          disabled
+          :fetch-suggestions="querySearchAddress"
+          placeholder="请输入内容"
+          @select="handleSelectAddress"
         >
-        </el-input>
+          <template slot-scope="{ item }">
+            <span class="addr">{{ item.addressPlace }}</span>
+          </template>
+        </el-autocomplete>
         <el-button type="primary" @click="ondrawerOut">选择</el-button>
       </el-form-item>
-      <el-form-item>
-        <label class="el-form-item__label" style="width: auto;"
-          >可装货时间</label
-        >
-        <el-date-picker
-          class="textinput3"
-          v-model.number="saleDateOfReceipt"
-          type="datetime"
-          placeholder="选择日期时间"
-          disabled
-        >
-        </el-date-picker>
-      </el-form-item>
       <el-form-item>
         <label
           class="el-form-item__label"
@@ -145,6 +137,19 @@
           placeholder="(非必填)"
         ></el-input>
       </el-form-item>
+      <el-form-item>
+        <label class="el-form-item__label" style="width: auto;"
+        >可装货时间</label
+        >
+        <el-date-picker
+          class="textinput3"
+          v-model.number="saleDateOfReceipt"
+          type="datetime"
+          placeholder="选择日期时间"
+          disabled
+        >
+        </el-date-picker>
+      </el-form-item>
     </el-form>
 
     <div class="button-box">
@@ -178,6 +183,10 @@
                   class="textinput111"
                   v-model.number="scope.row.orderPlanWeight"
                   placeholder="(必填)"
+                  :id="'input'+scope.$index"
+                  @keyup.up.native="clicks(scope.$index)"
+                  @keyup.down.native="clickx(scope.$index)"
+                  @keyup.enter.native="createACar"
                 ></el-input>
               </template>
               <!-- 米数 -->
@@ -289,6 +298,9 @@
           <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">
@@ -300,12 +312,11 @@
                   disabled
                 >
                 </el-input>
-                <el-button
-                  type="primary"
-                  @click="changeMaterial(scope.$index)"
-                  v-if="isCellClick == 1"
-                  >更改</el-button
-                >
+                <!--更改-->
+                <i class="el-icon-edit"
+                   @click="changeMaterial(scope.$index)"
+                   style="font-size: 20px"
+                   v-if="isCellClick == 1"></i>
               </template>
               <!-- 物资件数 -->
               <template v-if="item.prop == 'orderPlanWeight'">
@@ -314,6 +325,14 @@
                   v-model.number="scope.row.orderPlanWeight"
                 ></el-input>
               </template>
+              <!--规格型号-->
+              <template v-if="item.prop=='Specification'">
+                <el-input
+                  class="textinput"
+                  v-model.number="scope.row.Specification"
+                  style="width:120px"
+                ></el-input>
+              </template>
               <!-- 米数 -->
               <template v-if="item.prop == 'meterNumber'">
                 <el-input
@@ -350,12 +369,12 @@
                   disabled
                 >
                 </el-input>
-                <el-button
-                  type="primary"
-                  @click="ondrawer(scope.row, scope.$index)"
-                  v-if="isCellClick == 1"
-                  >选择</el-button
-                >
+                <!--增加-->
+                <i class="el-icon-folder-add"
+                   @click="ondrawer(scope.row, scope.$index)"
+                   v-if="isCellClick == 1"
+                   style="font-size: 20px"
+                ></i>
               </template>
               <!-- 收货客户电话号码 -->
               <template v-if="item.prop == 'saleOrderConsigneeTel'">
@@ -366,6 +385,14 @@
                   @change="batchUpdateValue(scope.row, scope.$index)"
                 ></el-input>
               </template>
+              <!-- 备注 -->
+              <template v-if="item.prop == 'truckRemark'">
+                <el-input
+                  class="textinput5"
+                  placeholder="(必填)"
+                  v-model="scope.row.truckRemark"
+                ></el-input>
+              </template>
             </template>
             <template v-else>
               <span>{{ scope.row[item.prop] }}</span>
@@ -373,7 +400,8 @@
           </template>
         </el-table-column>
         <!-- 操作列 -->
-        <el-table-column fixed="right" label="操作" width="100">
+        <el-table-column fixed="right" label="操作" width="200"
+                         v-if="isCellClick == 1">
           <template slot-scope="scope">
             <el-button
               @click.native.prevent="deleteRow(scope.$index, selectionList)"
@@ -381,6 +409,28 @@
               icon="el-icon-close"
               size="big"
             ></el-button>
+            <el-button
+              @click.native.prevent="copyRow(scope.$index, scope.row)"
+              type="text"
+              size="big"
+              >复制为一车</el-button
+            >
+            <el-button
+              @click.native.prevent="copyRowflu(scope.$index, scope.row)"
+              type="text"
+              size="big"
+              >复制为分录</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column fixed="right" width="80" v-if="isCellClick == 1">
+          <template slot-scope="scope">
+            <el-button
+              @click.native.prevent="copyRowfluAll(scope.$index, scope.row)"
+              type="text"
+              size="big"
+              >复制整车</el-button
+            >
           </template>
         </el-table-column>
       </el-table>
@@ -667,7 +717,7 @@ export default {
         {
           prop: "Specification",
           label: "规格型号",
-          width: "140"
+          width: "140",
         },
         {
           prop: "orderPlanWeight",
@@ -803,7 +853,8 @@ export default {
         {
           prop: "Specification",
           label: "规格型号",
-          width: "140"
+          width: "140",
+          slot: true
         },
         {
           prop: "orderPlanWeight",
@@ -860,7 +911,9 @@ export default {
       //收款公司
       saleOrderReceiveCustomer: null,
       //是否忽视收货客户电话字段
-      ignoreSaleOrderConsigneeTel: 0
+      ignoreSaleOrderConsigneeTel: 0,
+      //暂时存取的数据
+      temporarylist: [],
     };
   },
   created() {
@@ -885,6 +938,78 @@ export default {
     this.getAllSaleMessages();
   },
   methods: {
+    handleSelectAddress(item) {
+      this.saleShipperAddressName = item.addressPlace;
+      this.province = item.addressProvince;
+      this.city = item.addressDistrict;
+      this.county = item.addressTown;
+      this.saleShipperAddressId = item.shipperAddressId;
+      this.addressId = item.shipperAddressId;
+      this.place1 = item.place;
+      this.saleOrderConsigneeTel = item.saleOrderConsigneeTel;
+    },
+    querySearchAddress(queryString, cb) {
+      if (this.consigneeId != null) {
+        this.axios
+          .post(
+            "/api/v1/ams/matchingAddressRecently?receiveId=" + this.consigneeId
+          )
+          .then(res => {
+            var restaurants = res.data.data;
+            console.log(restaurants);
+            var results = queryString
+              ? restaurants.filter(this.createStateFilter(queryString))
+              : restaurants;
+            cb(results);
+          });
+      }
+    },
+    createStateFilter(queryString) {
+      return restaurants => {
+        return (
+          restaurants.addressPlace
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
+    copyRow(index, row) {
+      let copyRow = new Object();
+      Object.keys(row).forEach(key => {
+        copyRow[key] = row[key];
+      });
+      copyRow.cxh = this.maxCxh;
+      this.selectionList.push(copyRow);
+      this.getSpanArr(this.selectionList);
+      this.maxCxh++;
+    },
+    copyRowflu(index, row) {
+      console.log(index);
+      let copyRowflu = new Object();
+      Object.keys(row).forEach(key => {
+        copyRowflu[key] = row[key];
+      });
+      this.selectionList.splice(index + 1, 0, copyRowflu);
+      // this.selectionList.push(copyRowflu);
+      this.getSpanArr(this.selectionList);
+    },
+    copyRowfluAll(index, row) {
+      let arr = [];
+      //复制整车,根据车序号去寻找相同的列
+      arr = this.selectionList.concat([]).filter((item, index) => {
+        return item.cxh == row.cxh;
+      });
+      arr.forEach(e => {
+        let copyRow = new Object();
+        Object.keys(e).forEach(key => {
+          copyRow[key] = e[key];
+        });
+        copyRow.cxh = this.maxCxh;
+        this.selectionList.push(copyRow);
+      });
+      this.getSpanArr(this.selectionList);
+      this.maxCxh++;
+    },
     onblur() {
       this.isCellClick = 0;
       console.log("我这里值也变化了");
@@ -907,7 +1032,7 @@ export default {
         )
         .then(res => {
           //销售订单基础数据
-          console.log(res);
+          console.log(res.data.data);
           this.shipperName = res.data.data.shipperName;
           this.shipperId = res.data.data.shipperId;
           this.consigneeName = res.data.data.receiveName;
@@ -1319,6 +1444,7 @@ export default {
               saleShipperAddressName: this.saleShipperAddressName,
               saleDateOfReceipt: this.saleDateOfReceipt,
               saleOrderConsigneeTel: this.saleOrderConsigneeTel,
+              truckRemark: this.truckRemark,
               materialId: e.materialId,
               haveMeter: e.haveMeter,
               isDisable: e.isDisable
@@ -1349,6 +1475,7 @@ export default {
             saleShipperAddressName: this.saleShipperAddressName,
             saleDateOfReceipt: this.saleDateOfReceipt,
             saleOrderConsigneeTel: this.saleOrderConsigneeTel,
+            truckRemark: this.truckRemark,
             materialId: e.materialId,
             haveMeter: e.haveMeter,
             isDisable: e.isDisable
@@ -1616,6 +1743,22 @@ export default {
           colspan: _col
         };
       }
+      if (columnIndex === 8) {
+        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
+        };
+      }
     },
     //点击外层收货地址浏览事件
     ondrawerOut() {
@@ -1688,6 +1831,20 @@ export default {
     },
     //确定收货地址事件
     addAddressClick() {
+      //不管是外层还是内层都需要修改,如果存在都需要修改收货客户的电话
+      //定义一个正则表达式判断是否有电话
+      var est=/\d{11}/g
+      var string2=this.place.match(est)
+      console.log("-----------这是抓取到的数据----------")
+      console.log(string2)
+      if (string2 != null){
+        for(i=0;i<string2.length;i++){
+          var reg=/^1[3456789]\d{9}$/
+          if(reg.test(string2[i])){
+            this.saleOrderConsigneeTel=string2
+          }
+        }
+      }
       if (this.inOrOut % 2 == 0) {
         for (
           var i = this.row.index;
@@ -1745,7 +1902,7 @@ export default {
       }
     },
     // 确定
-    makeSure() {
+    async makeSure() {
       if (this.selectionList.length == 0) {
         this.$message.warning("请先填写具体信息");
         return;
@@ -1757,6 +1914,20 @@ export default {
           i++;
         }
       });
+      let s=0
+      //确认规格型号格式是否正确
+      await this.axios
+        .post("/api/v1/ams/queryFormat",this.selectionList)
+        .then(res=>{
+          if (res.data.code=="500"){
+            s=1
+          }
+        })
+      console.log("这是获取到的数据")
+      if (s== 1){
+        this.$message.error("规格型号有问题,请重新输入");
+        return;
+      }
       if (i != 0) {
         this.$message.error("件数必填且请输入正整数");
         return;
@@ -1792,8 +1963,37 @@ export default {
       });
       this.orderMakeSure = true;
     },
+    async getlist(){
+      let res=await this.axios
+        .post("/api/v1/ams/queryMaterial",this.selectionList)
+      this.selectionList=res.data.data
+      console.log("这是查询出来的")
+      console.log(res.data.data)
+      console.log("这是修改后的数据")
+      console.log(this.selectionList)
+    },
     //发送请求
-    sendRequest() {
+    async sendRequest() {
+      //根据规格型号与物资名称获取对应的物资ID||确认规格型号格式是否正确
+      //先把暂存区的数据清空
+      this.temporarylist=[]
+      let flag=0
+      await this.axios
+        .post("/api/v1/ams/queryMaterial",this.selectionList)
+        .then(res=>{
+          if (res.data.code === "500"){
+            flag=1
+          }
+          console.log(res.data.code)
+          //给暂存区的数据赋值
+          this.temporarylist=res.data.data
+          console.log("以下是查询出来的数据")
+          console.log(res.data.data)
+        })
+      if (flag===1){
+        this.$message.error("规格型号不对")
+        return
+      }
       //先调删除订单接口
       this.axios
         .post(
@@ -1806,6 +2006,9 @@ export default {
             //是否还有件数未填写
             var orderPlanWeightAllFill = 0;
             //初始化maplist
+            this.selectionList=this.temporarylist
+            console.log("以下是修改过后的数据")
+            console.log(this.selectionList)
             var mapList = [];
             this.selectionList.forEach(item => {
               if (!item.orderPlanWeight) {
@@ -1830,7 +2033,8 @@ export default {
                 //米数
                 steelMeters: 0,
                 //是否磅重销售
-                isPoundSale: 0
+                isPoundSale: 0,
+                truckRemark: null
               };
               mapItem.truckNo = item.cxh;
               mapItem.shipperAddressId = item.saleShipperAddressId;
@@ -1841,6 +2045,7 @@ export default {
               mapItem.materialNumber = item.orderPlanWeight;
               mapItem.steelMeters = item.meterNumber;
               mapItem.isPoundSale = item.isPound;
+              mapItem.truckRemark = item.truckRemark;
               mapList.push(mapItem);
             });
             let mapValue = {
@@ -1882,8 +2087,45 @@ export default {
         })
         .catch(_ => {});
     },
+    CloseClick() {},
+    //点击事件(上)
+    clicks(index){
+      console.log(index)
+      console.log(this.materialList)
+      console.log(this.materialList.length-1)
+      console.log('clicks=e',arguments);
+      if (index==0){
+        console.log("向上1")
+        //this.datalistindex=this.materialTableTop.length-1
+        document.getElementById("input" + (this.materialList.length-1)).focus()
+      }else {
+        console.log("向上2")
+        //this.$refs.materialTableTop.bodyWrapper.scrollTop=index
+        document.getElementById("input" + (index-1)).focus()
+      }
 
-    CloseClick() {}
+    },
+    //点击事件(下)
+    clickx(index){
+      console.log(index)
+      console.log(this.materialList)
+      console.log(this.materialList.length-1)
+      if (index ==this.materialList.length-1){
+        console.log("向下1")
+        document.getElementById("input" + 0).focus()
+      }else {
+        console.log("向下2")
+        //this.datalistindex+=1
+        //this.$refs.materialTableTop.bodyWrapper.scrollTop=(index+1)*height
+        //var tbl=document.getElementById("table").childNodes[0]
+        //tbl.childNodes[len].childNodes[0].childNodes[0].focus()children[3]
+        //const rowlist=this.$refs.materialTableTop.$el.children[3].children[1].children[0]
+        //.children[1].children[len].children[3].children[0].children[0].children[0].focus()
+        //console.log(rowlist)
+        var nextInput = document.getElementById("input" + (index + 1));
+        nextInput.focus()
+      }
+    }
   }
 };
 </script>

+ 18 - 16
src/views/appoint/components/saleContract/saleOrderOODetails.vue

@@ -153,28 +153,30 @@ export default {
     },
     //删除运输订单
     deleteClick(scope) {
+      let map = {
+        orderId: scope.row.orderId,
+        userId: getCookie("userId")
+      };
       this.$confirm("是否删除?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning"
       })
         .then(() => {
-          this.axios
-            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
-            .then(res => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "删除成功!"
-                });
-                this.getRequestUrl();
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning"
-                });
-              }
-            });
+          this.axios.post("/api/v1/oms/closeOmstruckOrder", map).then(res => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "删除成功!"
+              });
+              this.getRequestUrl();
+            } else {
+              this.$message({
+                message: "删除失败",
+                type: "warning"
+              });
+            }
+          });
         })
         .catch(() => {
           this.$message({

+ 234 - 108
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -226,25 +226,6 @@
         </el-tab-pane>
       </el-tabs>
     </div>
-    <div>
-      <el-dialog
-        title="销售订单预览"
-        :visible.sync="dialogTableVisible"
-        :center="true"
-        width="100%"
-      >
-        <ExcelSaleOrder :tableData="tableData"></ExcelSaleOrder>
-        <div class="btn">
-          <el-button
-            type="primary"
-            @click="addExcelInport"
-            @keyup.native.enter="addExcelInport"
-            >确认</el-button
-          >
-          <el-button type="primary" @click="cancelExcelInport">取消</el-button>
-        </div>
-      </el-dialog>
-    </div>
   </div>
 </template>
 <script>
@@ -274,20 +255,22 @@ export default {
       shipperId: 1,
       receivingCompany: [
         "四川省达州钢铁集团有限责任公司",
-        "四川达钢商贸有限公司"
+        "四川达钢商贸有限公司",
+        "江西久隆贸易有限公司",
+        "海南瀚途贸易有限公司"
       ],
       option: {
         // 表格请求数据的地址
         requestUrl: "",
         selectionType: "select",
         comparison: "saleNumber",
-        columnIndexs: [0, 1, 2, 3, 4, 9, 10, 11, 12, 13, 14, 15, 16, 17]
+        columnIndexs: [0, 1, 2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
       },
       option2: {
         // 表格请求数据的地址
         requestUrl: "",
         comparison: "saleNumber",
-        columnIndexs: [0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15, 16]
+        columnIndexs: [0, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
       },
       option4: {
         // 表格请求数据的地址
@@ -296,8 +279,8 @@ export default {
         columnIndexs: [
           0,
           1,
-          2,
-          3,
+          6,
+          7,
           8,
           9,
           10,
@@ -320,9 +303,7 @@ export default {
         comparison: "saleNumber",
         columnIndexs: [
           0,
-          1,
-          2,
-          3,
+          6,
           7,
           8,
           9,
@@ -350,7 +331,9 @@ export default {
         "isSelfMention",
         "saleRemark",
         "saleOrderReceiveCustomer",
-        "salerName"
+        "salerName",
+        "saleOrderNo",
+        "saleArea"
       ],
       saleOrderMapList: [
         "truckNo",
@@ -444,18 +427,7 @@ export default {
     } else {
       this.saleDateOfReceipt = loadTime1;
     }
-    // document.addEventListener("keydown", e => {
-    //   let key = window.event.keyCode;
-    //   if (key == 13) {
-    //     // 13是enter键的键盘码 如果等于13 就调用click的登录方法
-    //     this.addExcelInport();
-    //   }
-    // });
   },
-  // beforeDestroy() {
-  //   //这里的 this.login('loginForm') 指的是键盘事件的方法名
-  //   document.removeEventListener("keydown", this.addExcelInport());
-  // },
   activated() {
     if (getCookie("orgCode") == "shouhuokehu") {
       this.option.requestUrl =
@@ -508,7 +480,6 @@ export default {
       var workbook = null;
       //设置读取操作
       reader.onload = function(e) {
-        console.log(e);
         data = e.target.result;
         workbook = XLSX.read(data, {
           type: "binary"
@@ -520,24 +491,68 @@ export default {
         Array.from(rows).forEach((e, index) => {
           let map = {};
           try {
+            debugger;
             Object.keys(e).forEach(e1 => {
+              if (e1.includes("销售订单编号")) {
+                map.saleOrderNo = e[e1];
+              }
               if (e1.includes("物资名称")) {
                 map.materialName = e[e1];
+                if (
+                  e[e1].includes("盘螺") ||
+                  e[e1].includes("乱尺") ||
+                  e[e1].includes("盘元") ||
+                  e[e1].includes("盘圆")
+                ) {
+                  map.isPoundSale = 0;
+                } else {
+                  map.isPoundSale = 1;
+                }
+                //确定更改的物资有无米数
+                if (e[e1].includes("米")) {
+                  map.steelMeters = Number(e[e1].replace(/[^0.0-9.0]/gi, ""));
+                } else {
+                  map.steelMeters = null;
+                }
+              }
+              if (e1.includes("规格型号")) {
+                console.log(e[e1]);
+                let str = e[e1];
+                let regex = /\((.+?)\)/g;
+                if (str.match(regex) != null) {
+                  let spa = str.replace(str.match(regex)[0], "");
+                  let model = str
+                    .match(regex)[0]
+                    .replace("(", "")
+                    .replace(")", "");
+                  map.materialModel = model;
+                  if ((spa + "").includes("Φ")) {
+                    map.materialSpecification = spa;
+                  } else {
+                    map.materialSpecification = "Φ" + spa;
+                  }
+                } else {
+                  map.materialSpecification = e[e1];
+                  map.model = null;
+                }
               }
               if (e1.includes("下单客户")) {
                 map.receiveName = e[e1];
               }
-              if (e1.includes("米数")) {
+              if (
+                e1.includes("米数") &&
+                (map.steelMeters == null || map.steelMeters != "")
+              ) {
                 map.steelMeters = e[e1];
               }
-              if (e1.includes("物资规格")) {
+              if (e1.includes("物资规格") && !e1.includes("规格型号")) {
                 if ((e[e1] + "").includes("Φ")) {
                   map.materialSpecification = e[e1];
                 } else {
                   map.materialSpecification = "Φ" + e[e1];
                 }
               }
-              if (e1.includes("物资型号")) {
+              if (e1.includes("物资型号") && !e1.includes("规格型号")) {
                 map.materialModel = e[e1];
               }
               if (e1.includes("物资件数")) {
@@ -551,7 +566,7 @@ export default {
                 }
               }
               if (e1.includes("车序号")) {
-                if (isNumber(e[e1])) {
+                if (typeof e[e1] != "undefined" && isNumber(e[e1])) {
                   map.truckNo = e[e1];
                 } else {
                   throw new Error(
@@ -574,6 +589,16 @@ export default {
               }
               if (e1.includes("摘要")) {
                 map.saleRemark = e[e1];
+                let regex = /钢材.*组/g;
+                if (e[e1].match(regex)) {
+                  map.saleArea = e[e1].match(regex)[0];
+                }
+                let regex1 = /范围.*米/g;
+                if (e[e1].match(regex1)) {
+                  map.steelMeters = Number(
+                    str.match(regex)[0].match(/(\d+(\.\d+)?)/g)
+                  );
+                }
               }
               if (e1.includes("省")) {
                 map.province = e[e1];
@@ -593,92 +618,152 @@ export default {
               if (e1.includes("备注")) {
                 map.truckRemark = e[e1];
               }
-              if (e1.includes("是否磅重交货")) {
-                if (e[e1] == "是") {
-                  map.isPoundSale = 0;
-                } else if (e[e1] == "否") {
-                  map.isPoundSale = 1;
-                } else {
-                  throw new Error(
-                    `该Excel第--${index +
-                      2}--行-“是否磅重交货”-错误,请核实后再输入`
-                  );
-                }
-              }
               if (e1.includes("是否自提")) {
                 if (e[e1] === "是" || e[e1] === "否") {
                   map.isSelfMention = e[e1];
                 } else {
-                  throw new Error(
-                    `该Excel第--${index + 2}--行-“是否自提”-错误,请核实后再输入`
-                  );
+                  map.isSelfMention = "否";
                 }
               }
             });
             map.shipperName = that.shipperName;
-            that.tableData.push(map);
+            if (typeof map.isSelfMention === "undefined") {
+              map.isSelfMention = "否";
+            }
+            if (map.saleRemark && map.receiveName && map.materialName) {
+              that.tableData.push(map);
+            }
           } catch (e) {
             that.$message.error(e.message);
           }
         });
-        that.dialogTableVisible = true;
+        console.log(this.tableData);
+        that.addExcelInport();
+        // that.dialogTableVisible = true;
         return;
       };
       reader.readAsBinaryString(file.raw); //以二进制方式读取
     },
+    //自己写一个比较函数排序
+    // 排序
+    compare(property) {
+      return function(a, b) {
+        var value1 = a[property];
+        var value2 = b[property];
+        return value2 - value1;
+      };
+    },
     addExcelInport() {
-      this.$confirm("以上均核对正确,确定导入Excel", "提示", {
-        cancelButtonText: "取消",
-        confirmButtonText: "确认",
-        center: true
-      })
-        .then(() => {
-          let map = {};
-          let arr = [];
-          this.tableData.forEach(e => {
-            let mapMaterial = {};
-            Object.keys(e).forEach(e1 => {
-              if (this.saleOrderList.includes(e1)) {
-                map[e1] = e[e1];
-              }
-              if (this.saleOrderMapList.includes(e1)) {
-                mapMaterial[e1] = e[e1];
-              }
-            });
-            mapMaterial.saleDateOfReceipt = sjTime(this.saleDateOfReceipt);
-            arr.push(mapMaterial);
-          });
-          map.shipperId = 1;
-          map.mapList = arr;
-          console.log(map);
-          this.axios
-            .post("/api/v1/ams/addSteelSaleOrder", map)
-            .then(res => {
-              if (res.data.code == "200") {
-                this.$message.success("新增销售订单成功!");
-                this.getRequestUrl();
-                this.dialogTableVisible = false;
-                this.tableData = [];
-              } else {
-                this.$message.error(res.data.data);
-                this.getRequestUrl();
-                this.dialogTableVisible = false;
-                this.tableData = [];
+      //加载虚拟
+      const loading = this.$loading({
+        lock: true,
+        text: "正在快马加鞭为您生成销售订单,请稍候",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      console.log(this.tableData);
+      debugger;
+      //遍历数组,根据摘要和下单客户自动给出销售订单编号
+      for (let i = 0; i < this.tableData.length; i++) {
+        if (i === 0) {
+          this.tableData[i].saleOrderNo = 1;
+        } else {
+          let sortArr = this.tableData
+            .filter(e => {
+              return (
+                typeof e.saleOrderNo != "undefined" &&
+                e.saleOrderNo != "undefined" &&
+                isNumber(e.saleOrderNo)
+              );
+            })
+            .map(e => {
+              if (
+                typeof e.saleOrderNo != "undefined" &&
+                e.saleOrderNo != "undefined" &&
+                isNumber(e.saleOrderNo)
+              ) {
+                return e.saleOrderNo;
               }
             })
-            .catch(e => {
-              this.$message.error("生成错误!");
-              this.dialogTableVisible = false;
-              this.tableData = [];
+            .sort((a, b) => {
+              return a - b;
             });
+          //当大于0的时候,需要遍历整个数组,与之相等的有哪些
+          for (let j = 0; j < i; j++) {
+            if (
+              this.tableData[i].saleRemark === this.tableData[j].saleRemark &&
+              this.tableData[i].receiveName === this.tableData[j].receiveName &&
+              this.tableData[i].saleOrderReceiveCustomer ===
+                this.tableData[j].saleOrderReceiveCustomer
+            ) {
+              this.tableData[i].saleOrderNo = this.tableData[j].saleOrderNo;
+              break;
+            } else {
+              if (j == i - 1) {
+                this.tableData[i].saleOrderNo = sortArr[sortArr.length - 1] + 1;
+              }
+            }
+          }
+        }
+      }
+      // this.tableData = this.tableData.sort(this.compare("saleOrderNo"));
+      // debugger;
+      //需要遍历数组,以销售订单编号为分类
+      const map1 = this.tableData.reduce((result, item) => {
+        result[item.saleOrderNo] = result[item.saleOrderNo] || [];
+        result[item.saleOrderNo].push(item);
+        return result;
+      }, {});
+      // result即为所求
+      let result = Object.values(map1);
+      console.log(result);
+      debugger;
+      //遍历数组
+      let saleOrderListMap = [];
+      result.forEach((saleOrderList, index) => {
+        let map = {};
+        let arr = [];
+        console.log("saleOrderList");
+        console.log(saleOrderList);
+        saleOrderList.forEach(e => {
+          let mapMaterial = {};
+          Object.keys(e).forEach(e1 => {
+            if (this.saleOrderList.includes(e1)) {
+              map[e1] = e[e1];
+            }
+            if (this.saleOrderMapList.includes(e1)) {
+              mapMaterial[e1] = e[e1];
+            }
+          });
+          mapMaterial.saleDateOfReceipt = sjTime(this.saleDateOfReceipt);
+          arr.push(mapMaterial);
+        });
+        map.shipperId = 1;
+        map.mapList = arr;
+        saleOrderListMap.push(map);
+      });
+      console.log(saleOrderListMap);
+      this.axios
+        .post("/api/v1/ams/addSteelSaleOrderList", saleOrderListMap)
+        .then(res => {
+          if (res.data.code == "200") {
+            loading.close();
+            this.getRequestUrl();
+            this.$message.success("新增销售订单成功!");
+            this.tableData = [];
+          } else {
+            this.$message.error(res.data.data);
+            this.getRequestUrl();
+            loading.close();
+            this.tableData = [];
+          }
         })
-        .catch(() => {
-          this.$message.info("取消导入");
+        .catch(e => {
+          this.$message.error("生成错误!");
+          loading.close();
+          this.tableData = [];
         });
     },
-    cancelExcelInport() {
-      this.dialogTableVisible = false;
-    },
     adverseCloseSaleOrder(row) {
       console.log(row);
       this.$confirm("确定反关闭整条订单吗?", "继续?", {
@@ -800,6 +885,7 @@ export default {
         });
     },
     deleteSaleOrder(row) {
+      console.log(row);
       this.$prompt("此操作将关闭订单且下面的待运输订单,是否继续?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -815,7 +901,9 @@ export default {
               reason: value
             };
             this.axios
-              .post("/api/v1/ams/deleteSaleOrderSame", mapValue)
+              .post(
+                "/api/v1/ams/deleteSaleOrderById?saleOrderId=" + row.saleOrderId
+              )
               .then(res => {
                 if (res.data.code == 200) {
                   this.$message.success("关闭成功");
@@ -991,6 +1079,44 @@ export default {
             "&i=" +
             new Date();
         }
+      } else if (getCookie("orgCode") == "xiaoshouyewuyuan") {
+        if (this.activeName == "first") {
+          this.option.requestUrl =
+            "/api/v1/ams/getSaleOrderInfoes?apiId=408&saleType=1&con=" +
+            this.input +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date() +
+            "saler=" +
+            getCookie("loginName");
+        } else if (this.activeName == "second") {
+          this.option2.requestUrl =
+            "/api/v1/ams/getSaleOrderReportedes?apiId=408&saleType=1&con=" +
+            this.input +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date() +
+            "saler=" +
+            getCookie("loginName");
+        } else if (this.activeName == "four") {
+          this.option4.requestUrl =
+            "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&saleType=1&shipperId=1&con=" +
+            this.input +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date() +
+            "saler=" +
+            getCookie("loginName");
+        }
       } else {
         if (this.activeName == "first") {
           this.option.requestUrl =

+ 159 - 5
src/views/appoint/components/saleContract/transportPrice.vue

@@ -10,6 +10,18 @@
         <i class="el-icon-plus"></i>新增
       </el-button>
        <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+<!--      <el-upload
+        class="upload-excel"
+        action=""
+        :on-change="importExcel"
+        :show-file-list="false"
+        accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
+        :auto-upload="false"
+      >
+        <el-button type="primary">
+          导入单价表
+        </el-button>
+      </el-upload>-->
     </div>
 
 <el-tabs v-model="activeName">
@@ -23,7 +35,7 @@
           <dilTable ref="excelDom" v-bind.sync="option2" :loading="loading" :isKuang="isKuang" @func="func">
           </dilTable>
       </el-tab-pane>
-      
+
     </el-tabs>
   </div>
 </template>
@@ -58,16 +70,158 @@ export default {
       this.loading = true;
       this.isKuang = true;
       if(this.input){
-        this.option.requestUrl ="/api/v1/ams/getAmsContractTransportPrice1?apiId=109&con=" +this.input;
+        this.option.requestUrl ="/api/v1/ams/getAmsContractTransportPrice1?apiId=109&deleted=0&con=" +this.input+"&i="+new Date();
+        this.option2.requestUrl ="/api/v1/ams/getAmsContractTransportPrice1?apiId=109&deleted=1&con=" +this.input+"&i="+new Date();
       }else{
-        this.option.requestUrl ="/api/v1/ams/getAmsContractTransportPrice1?apiId=109&i="+new Date();
+        this.option.requestUrl ="/api/v1/ams/getAmsContractTransportPrice1?apiId=109&deleted=0&i="+new Date();
+        this.option2.requestUrl ="/api/v1/ams/getAmsContractTransportPrice1?apiId=109&deleted=1&con=" +this.input+"&i="+new Date();
       }
     },
     btnclick() {
       this.$router.push("/addTransportPrice");
     },
+    /*importExcel(file){
+      let that = this;
+      if (!file) {
+        that.$message({
+          message: "文件错误!",
+          type: "warning"
+        });
+        return;
+      }
+      let excelData =[]
+      var reader=new FileReader();
+      var data=null;
+      var workbook = null;
+      //设置读取操作
+      reader.onload = function (e){
+        console.log(e);
+        data = e.target.result;
+        workbook=XLSX.read(data,{type:'binary'});
+        console.log(workbook)
+        //只取第一个表的数据
+        let rows= XLSX.utils.sheet_to_json(
+          workbook.Sheets[workbook.SheetNames[0]]
+        );
+        console.log(rows)
+        let index=1;
+        // for (index=1;index<rows.length;index++){
+        //   if (
+        //     typeof workbook.Sheets[workbook.SheetNames[0]]["A"+index] !=
+        //     "undefined"
+        //   ){
+        //     index++;
+        //     break
+        //   }
+        // }
+        // console.log("表头行数:" + index);
+        // if(index>=rows.length){
+        //   that.$message({
+        //     message: "文件错误!",
+        //     type: "warning",
+        //   });
+        //   return
+        // }
+        if (
+          typeof workbook.Sheets[workbook.SheetNames[0]]["A" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["B" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["C" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["D" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["E" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["F" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["G" + index] == 'undefined' ||
+          typeof workbook.Sheets[workbook.SheetNames[0]]["H" + index] == 'undefined' ||
+          workbook.Sheets[workbook.SheetNames[0]]["A" + index].v != "序号" ||
+          workbook.Sheets[workbook.SheetNames[0]]["B" + index].v != "省份" ||
+          workbook.Sheets[workbook.SheetNames[0]]["C" + index].v != "市/区" ||
+          workbook.Sheets[workbook.SheetNames[0]]["D" + index].v != "县/镇" ||
+          workbook.Sheets[workbook.SheetNames[0]]["E" + index].v != "卸货地点" ||
+          workbook.Sheets[workbook.SheetNames[0]]["F" + index].v != "参考运距(公里)" ||
+          workbook.Sheets[workbook.SheetNames[0]]["G" + index].v != "运价(元/吨)" ||
+          workbook.Sheets[workbook.SheetNames[0]]["H" + index].v != "吨公里(元/吨.km)"
+        ){
+          if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["A" + index] == 'undefined' ||
+            workbook.Sheets[workbook.SheetNames[0]]["A" + index].v != "序号"
+          ) {
+            that.$message({
+              message: "表格格式错误:序号错误",
+              type: "warning"
+            });
+          }
+          if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["B" + index] == 'undefined' ||
+            workbook.Sheets[workbook.SheetNames[0]]["B" + index].v != "省份"
+          ) {
+            that.$message({
+              message: "表格格式错误:省份错误",
+              type: "warning"
+            });
+          }
+          if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["C" + index] == 'undefined' ||
+            workbook.Sheets[workbook.SheetNames[0]]["C" + index].v != "市/区"
+          ) {
+            that.$message({
+              message: "表格格式错误:市/区错误",
+              type: "warning"
+            });
+          }
+          if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["D" + index] == 'undefined' ||
+            workbook.Sheets[workbook.SheetNames[0]]["D" + index].v != "县/镇"
+          ) {
+            that.$message({
+              message: "表格格式错误:县/镇错误",
+              type: "warning"
+            });
+          }
+          if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["E" + index] == 'undefined' ||
+            workbook.Sheets[workbook.SheetNames[0]]["E" + index].v != "卸货地点"
+          ) {
+            that.$message({
+              message: "表格格式错误:卸货地点错误",
+              type: "warning"
+            });
+          }
+          if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["F" + index] == 'undefined' ||
+            workbook.Sheets[workbook.SheetNames[0]]["F" + index].v != "参考运距(公里)"
+          ) {
+            that.$message({
+              message: "表格格式错误:参考运距(公里)错误",
+              type: "warning"
+            });
+          }
+          if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["G" + index] == 'undefined' ||
+            workbook.Sheets[workbook.SheetNames[0]]["G" + index].v != "运价(元/吨)"
+          ) {
+            that.$message({
+              message: "表格格式错误:运价(元/吨)错误",
+              type: "warning"
+            });
+          }
+          if (
+            typeof workbook.Sheets[workbook.SheetNames[0]]["G" + index] == 'undefined' ||
+            workbook.Sheets[workbook.SheetNames[0]]["H" + index].v != "吨公里(元/吨.km)"
+          ) {
+            that.$message({
+              message: "表格格式错误:吨公里(元/吨.km)错误",
+              type: "warning"
+            });
+          }
+        }
+        //读取表格
+        for (let i = index+1; i <= rows.length+1 ; i++){
+          console.log(workbook.Sheets[workbook.SheetNames[0]]["B" + i].v)
+        }
+      }
+      reader.readAsBinaryString(file.raw);
+    }*/
   },
-  
+
 };
 </script>
 <style lang='scss' scoped>
@@ -80,4 +234,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 3 - 1
src/views/appoint/components/ship/addDeliveryAttorney.vue

@@ -220,6 +220,7 @@ export default {
         downSwimPortId: this.downSwimPortId,
         attorenyPickupIdcard: this.form1.attorenyPickupIdcard,
         attorneyContactTelephone: this.form1.attorneyContactTelephone,
+        realForeignShipName:this.form1.realForeignShipName,
         batchId: this.batchIds,
         attorneyTime: sjTime(this.form1.attorneyTime),
         attorneyPdffile: this.form1.attorneyPdffile,
@@ -264,7 +265,8 @@ export default {
         typeof AmsshipDeliveryAttorney.requesterGroupId =='undefined' ||  AmsshipDeliveryAttorney.requesterGroupId == null ||
         AmsshipDeliveryAttorney.attorenyPickupIdcard == null ||
         AmsshipDeliveryAttorney.attorneyContactTelephone == null ||
-        AmsshipDeliveryAttorney.attorneyPickupContactPerson == null
+        AmsshipDeliveryAttorney.attorneyPickupContactPerson == null ||
+        AmsshipDeliveryAttorney.realForeignShipName == null
       )
         this.$message.error("存在空值,请核实以后再提交");
       else if (!isTelePhone(val2)) 

+ 59 - 6
src/views/appoint/components/ship/addDeliveryNotice.vue

@@ -40,7 +40,10 @@
       <span class="motext">批次</span>
       <el-input class="moinput" v-model="batchIds" disabled> </el-input>
       <el-button class="mobutton" type="primary" @click="ondrawer(5)"
-        >浏览</el-button
+        >选批次</el-button
+      >
+      <el-button class="mobutton" type="primary" @click="ondrawer(6)"
+        >录批次</el-button
       >
     </div>
     <div class="form">
@@ -82,7 +85,7 @@
       <el-input
         placeholder="请输入内容"
         v-model="input"
-        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        style="margin-top: 10px; margin-left: 20px; width: 200px"
         clearable
       >
       </el-input>
@@ -94,6 +97,21 @@
       >
         <i class="el-icon-search"></i>查询
       </el-button>
+      <el-input
+       v-show="a == 6"
+        placeholder="请输入外轮船名"
+        v-model="foreignShipName"
+        style="width: 200px"
+        clearable
+      ></el-input>
+      <el-button
+      v-show="a == 6"
+        type="primary"
+        class="btn"
+        @click="handleClose"
+        style="margin-bottom: 15px"
+      >确定
+      </el-button>
       <!-- <div v-show="a == 4">
         <dilTable v-bind.sync="options" @radio-change="currentRadioChange6"></dilTable>
       </div> -->
@@ -127,6 +145,12 @@
           @radio-change="currentRadioChange5"
         ></dilTable>
       </div>
+      <div v-show="a == 6">
+        <dilTable
+          v-bind.sync="second6"
+          @radio-change="currentRadioChange6"
+        ></dilTable>
+      </div>
     </el-drawer>
     <el-form
       :inline="true"
@@ -225,7 +249,11 @@ export default {
         selectionType: "radio",
         mapList5: [],
       },
-
+      second6: {
+        requestUrl: "/api/v1/uc/queryMaterialByLike?apiId=244",
+        selectionType: "radio",
+      },
+      foreignShipName:null,
       value: undefined,
       value2: undefined,
       value4: undefined,
@@ -350,7 +378,17 @@ export default {
         (this.batchIds =
           selection.foreignShipName + "" + selection.materialName);
     },
-
+    currentRadioChange6(selection) {
+      this.second5.mapList5 = selection;
+      console.log("selection",selection);
+    },
+    checkForeignShipName(){
+      if(this.foreignShipName==null || this.foreignShipName==''){
+        this.$message.warning("请输入外轮船名!");
+        return false;
+      }
+      return true;
+    },
     onchange(val) {},
 
     onclick(a) {
@@ -367,10 +405,25 @@ export default {
       } else if (a == 5) {
         this.second5.requestUrl =
           "/api/v1/tms/getBatchIdByForeign?apiId=489&con=" + this.input;
+      }else if(a == 6){
+          this.second6.requestUrl = 
+          "/api/v1/uc/queryMaterialByLike?apiId=244&index=" + this.input;
       }
     },
-
+    //关闭模态框窗口
     handleClose(done) {
+      if(this.a==6){
+        //校验外轮船名和批次
+        if(!this.checkForeignShipName()){
+          return;
+        }else if(this.second5.mapList5.length == 0){
+          this.$message.warning("请选择物资!");
+          return;
+        }
+        this.batchIds = this.foreignShipName + "" + this.second5.mapList5.materialName;
+        this.second5.mapList5.foreignShipName = this.foreignShipName;
+      }
+      this.drawer=false;
       done();
     },
 
@@ -439,7 +492,7 @@ export default {
         sulfurcontent: this.form1.sulfurcontent,
         userId: getCookie("userId"),
       };
-
+      
       //判断放货数量是否为数字
       if (
         map.noticeCommerceMethod == null ||

+ 1 - 1
src/views/appoint/components/ship/attorneytext.vue

@@ -49,7 +49,7 @@
                 }}
                 前来贵港办理我公司的货权提货和水路运输事宜,品种:{{
                   item.materialName
-                }};外轮船名:{{ item.resultForeignShipName }}; 数量:{{
+                }};外轮船名:{{ item.realForeignShipName }}; 数量:{{
                   item.purchaseOrderMaterialNum
                 }}
                 湿吨(如遇该轮最后一批提货请清场),物流流向:{{

+ 17 - 0
src/views/appoint/components/ship/deliveryAttorney.vue

@@ -75,6 +75,23 @@
       <!-- 已下发 -->
       <el-tab-pane label="已下发" name="second">
         <dilTable v-bind.sync="option2" @selection-change="selectionChange">
+          <el-table-column
+            fixed="right"
+            align="center"
+            label="操作"
+            width="120"
+          >
+            <template slot-scope="scope">
+              <el-button
+                @click="modifyClick(scope.row.attorneyId)"
+                type="text"
+                size="small"
+                :disabled="scope.row.purchaseOrderMaterialNum && scope.row.realForeignShipName && scope.row.realForeignShipName != '' && scope.row.realForeignShipName != 'null'"
+              >
+                修改
+              </el-button>
+            </template>
+          </el-table-column>
         </dilTable>
       </el-tab-pane>
     </el-tabs>

+ 23 - 9
src/views/appoint/components/ship/deliveryNotice.vue

@@ -3,7 +3,7 @@
   <div class="shipTransport">
     <div class="top">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <!-- <el-date-picker
+      <el-date-picker
         v-model="startTime"
         type="datetime"
         placeholder="选择日期"
@@ -11,7 +11,7 @@
       </el-date-picker>
       <span>至</span>
       <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
-      </el-date-picker> -->
+      </el-date-picker>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -21,6 +21,9 @@
       <el-button type="primary" @click="refresh()">
         <i class="el-icon-refresh"></i>刷新
       </el-button>
+      <el-button type="primary" @click="exportData()" v-if="activeName == 'second'">
+        <i class="el-icon-download"></i>导出(Excel)
+      </el-button>
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <!-- 未下发 -->
@@ -67,7 +70,7 @@
       </el-tab-pane>
       <!-- 已下发 -->
       <el-tab-pane label="已下发" name="second">
-        <dilTable v-bind.sync="option2">
+        <dilTable v-bind.sync="option2"  ref="excelDom">
           <el-table-column
             fixed="right"
             align="center"
@@ -128,6 +131,7 @@ export default {
       src: "",
       startTime: null,
       endTime: null,
+      tableTitle: "发货通知",
       // restaurants: [],
       input: "",
       activeName: "first",
@@ -141,7 +145,19 @@ export default {
       },
     };
   },
+  mounted(){
+    this.initDate();
+    this.onclick();
+  },
   methods: {
+    initDate(){
+      this.startTime=new Date();
+      this.endTime=new Date();
+      this.startTime.setDate(1);
+      this.startTime.setHours(0);
+      this.startTime.setMinutes(0);
+      this.startTime.setSeconds(0);
+    },
     onclick() {
       let startTime = null;
       let endTime = null;
@@ -152,7 +168,7 @@ export default {
         endTime = sjTime(this.endTime);
       }
       if (startTime && endTime && startTime < endTime) {
-        if (this.activeName == "first") {
+
           this.option1.requestUrl =
             "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0&carrierSSOId=" +
             getCookie("userId") +
@@ -162,7 +178,7 @@ export default {
             startTime +
             "&endTime=" +
             endTime;
-        } else {
+       
           this.option2.requestUrl =
             "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=1&carrierSSOId=" +
             getCookie("userId") +
@@ -172,21 +188,19 @@ export default {
             startTime +
             "&endTime=" +
             endTime;
-        }
       } else {
-        if (this.activeName == "first") {
+        
           this.option1.requestUrl =
             "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=0&carrierSSOId=" +
             getCookie("userId") +
             "&con=" +
             this.input;
-        } else {
+       
           this.option2.requestUrl =
             "/api/v1/tms/getshipDeliveryNoticeList?apiId=69&status=1&carrierSSOId=" +
             getCookie("userId") +
             "&con=" +
             this.input;
-        }
       }
     },
     addClick() {

+ 1 - 0
src/views/appoint/components/ship/modifyDeliveryAttroney.vue

@@ -137,6 +137,7 @@ export default {
         portId: this.portId,
         batchId:this.batchInfactoryId,
         attorneyContactTelephone:this.form1.attorneyContactTelephone,
+        realForeignShipName:this.form1.realForeignShipName,
         attorenyPickupIdcard: this.form1.attorenyPickupIdcard,
         attorneyPickupContactPerson: this.form1.attorneyPickupContactPerson,
         downSwimPortId: this.downSwimPortId,

+ 1 - 1
src/views/appoint/components/ship/modifyDeliveryNotice.vue

@@ -411,7 +411,7 @@ export default {
         map.silicaContent == null ||
         map.aluminaContent == null ||
         map.phosphorusContent == null ||
-        map.manganeseContent == null ||
+        // map.manganeseContent == null ||
         map.resultContactPerson == null ||
         map.resultTelephoneFax == null ||
         map.resultNumberOfLoans == null ||

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

@@ -70,6 +70,7 @@ import saleOrderOODetails from "../components/saleContract/saleOrderOODetails.vu
 import updateSaleOrderSteel from "../components/saleContract/updateSaleOrderSteel.vue";
 import copySteelOrder from "../components/saleContract/copySteelOrder.vue";
 import rangeValuePoint from "../components/inward/rangePoint.vue";
+import updateTransPrice from "../components/inward/updateTransPrice.vue";
 Vue.use(Router);
 
 const constantRouterMap = [
@@ -475,6 +476,12 @@ const constantRouterMap = [
         name: "rangeValuePoint",
         meta: { code: "xtpzgl-yhgl" },
         component: rangeValuePoint
+      },
+      {
+        path: "updateTransPrice",
+        name: "updateTransPrice",
+        meta: { code: "xtpzgl-yhgl" },
+        component: updateTransPrice
       }
     ]
   }

+ 252 - 226
src/views/inward/components/inwardFactory/timeTaskResult.vue

@@ -1,66 +1,71 @@
 // 计时作业
 <template>
-    <div class="sale">
-        <div class="top">
-            <!-- 框计算 -->
-            <span class="text">计时时间:</span>
-            <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
-            </el-date-picker>
-            <span class="text">至</span>
-            <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
-            </el-date-picker>
-            <el-button type="primary" class="btn" @click="onclick">
-                <i class="el-icon-search"></i>查询
-            </el-button>
-            <!-- excel导出 -->
-            <el-button type="primary" @click="exportData()">
-                <i class="el-icon-download"></i>导出(Excel)
-            </el-button>
-        </div>
-        <div class="tab">
-            <dilTable v-bind.sync="option"  ref="excelDom">
-                <el-table-column fixed="right" label="操作" width="180">
-                <template slot-scope="scope">
-                    <div class="step">
-                        <el-button
-                        @click="detailclick1(scope.row)"
-                        type="text"
-                        size="small"
-                        >运输详情</el-button>
-                    </div>
-                  <!-- <el-button @click="" type="primary" style="margin-left: 16px;">
+  <div class="sale">
+    <div class="top">
+      <!-- 框计算 -->
+      <span class="text">计时时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span class="text">至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <!-- excel导出 -->
+      <el-button type="primary" @click="exportData()">
+        <i class="el-icon-download"></i>导出(Excel)
+      </el-button>
+    </div>
+    <div class="tab">
+      <dilTable v-bind.sync="option" ref="excelDom">
+        <el-table-column fixed="right" label="操作" width="180">
+          <template slot-scope="scope">
+            <div class="step">
+              <el-button
+                @click="detailclick1(scope.row)"
+                type="text"
+                size="small"
+                >运输详情</el-button
+              >
+            </div>
+            <!-- <el-button @click="" type="primary" style="margin-left: 16px;">
                     运输详情
                   </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="tableData1" 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>
-        </div>
-        
+          </template>
+        </el-table-column>
         <!-- 运输进程详情 -->
-        <!-- <el-drawer
+        <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="tableData1" 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>
+    </div>
+
+    <!-- 运输进程详情 -->
+    <!-- <el-drawer
             :visible.sync="drawer"
             :direction="direction"> -->
-            <!-- 步骤条显示 -->
-            <!-- <div style="height: 200px;content-align:center" >
+    <!-- 步骤条显示 -->
+    <!-- <div style="height: 200px;content-align:center" >
                 <el-table
                 :data="stepList"
                 style="width: 100%">
@@ -77,188 +82,209 @@
                 </el-table>
             </div>
         </el-drawer> -->
-    </div>
+  </div>
 </template>
 <script>
 import { getCookie } from "@/utils/util.js";
 import { sjTime } from "@/utils/sharedJsFile";
 export default {
-    data(){
-        return{
-            inputText:'',
-            option: {       
-                // 表格请求数据的地址
-                requestUrl: "",
-            },
-            tableHead: [
-                {
-                prop: "linkName",
-                label: "计时状态",
-                width: 150,
-                },
-                {
-                prop: "pointDate",
-                label: "时间",
-                width: 150,
-                }
-            ],
-            tableData1: [],
-            tableData: [],
-            startTime: null,
-            endTime: null,
-            oldRow1: "",
-            oldRowCount1: 1,
-            drawer: false,
-            direction: 'rtl',
-            orderId: 0,
-            stepList:[],
-            tableTitle:'计时统计'
+  data() {
+    return {
+      inputText: "",
+      option: {
+        // 表格请求数据的地址
+        requestUrl: ""
+      },
+      tableHead: [
+        {
+          prop: "linkName",
+          label: "计时状态",
+          width: 150
+        },
+        {
+          prop: "pointDate",
+          label: "时间",
+          width: 150
         }
-    },
-    created(){
-        if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode") == "zidonghuabu"||getCookie("orgCode") == "wuliuchuyunzhongxin"){
-            this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458"
-        }else{
-            console.log("cookier"+getCookie("userId"))
-            this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458&orgCode="+getCookie("userId");
+      ],
+      tableData1: [],
+      tableData: [],
+      startTime: null,
+      endTime: null,
+      oldRow1: "",
+      oldRowCount1: 1,
+      drawer: false,
+      direction: "rtl",
+      orderId: 0,
+      stepList: [],
+      tableTitle: "计时统计"
+    };
+  },
+  created() {
+    if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu" ||
+      getCookie("orgCode") == "wuliuchuyunzhongxin"
+    ) {
+      this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458";
+    } else {
+      this.option.requestUrl =
+        "/api/v1/tms/getAllTimeTaskResult?apiId=458&userId=" +
+        getCookie("orgCode");
+    }
+  },
+  methods: {
+    // -------查看物资详情(已拒绝)
+    detailclick1(row) {
+      // 记录重复点击次数
+      if (this.oldRow1 === row) {
+        this.oldRowCount1 += 1;
+      }
+      this.orderId = row.orderId;
+      let map = {
+        orderId: this.orderId
+      };
+      // 切换当前详情表
+      this.$refs.excelDom.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow1 != "") {
+        if (this.oldRow1 != row) {
+          if (this.oldRowCount1 % 2 === 1) {
+            this.$refs.excelDom.toggleRowExpansion(this.oldRow1);
+          } else {
+            this.oldRowCount1 = 1;
+          }
+        } else {
+          this.oldRow1 = null;
+          return;
         }
+      }
+      // 重置上一个点击对象
+      this.oldRow1 = row;
+      // 根据销售订单物资中间表id查询物资信息
+      this.axios.post("/api/v1/oms/getOrderResult?orderId=", map).then(res => {
+        console.log("res", res);
+        this.tableData1 = res.data;
+      });
     },
-    methods:{
-        // -------查看物资详情(已拒绝)
-        detailclick1(row) {
-        // 记录重复点击次数
-        if (this.oldRow1 === row) {
-            this.oldRowCount1 += 1;
-        }
-        this.orderId = row.orderId
-        let map = {
-            orderId : this.orderId
+    getStepsList(row) {
+      console.log(row.orderId);
+      this.orderId = row.orderId;
+      this.drawer = true;
+      let map = {
+        orderId: this.orderId
+      };
+      this.axios.post("/api/v1/oms/getOrderResult", map).then(res => {
+        console.log(res);
+        if (res.status == 200) {
+          this.stepList = res.data;
+        } else {
+          this.$message.error("展示失败!");
         }
-        // 切换当前详情表
-        this.$refs.excelDom.toggleRowExpansion(row);
-        // 打开前关闭上一个详情表
-        if (this.oldRow1 != "") {
-            if (this.oldRow1 != row) {
-            if (this.oldRowCount1 % 2 === 1) {
-                this.$refs.excelDom.toggleRowExpansion(this.oldRow1);
-            } else {
-                this.oldRowCount1 = 1;
-            }
-            } else {
-            this.oldRow1 = null;
-            return;
-            }
-        }
-        // 重置上一个点击对象
-        this.oldRow1 = row;
-        // 根据销售订单物资中间表id查询物资信息
-        this.axios
-            .post("/api/v1/oms/getOrderResult?orderId=",map)
-            .then((res) => {
-            console.log("res",res)
-            this.tableData1 = res.data;
-            });
-        },
-        getStepsList(row){
-            console.log(row.orderId)
-            this.orderId = row.orderId
-            this.drawer = true
-            let map = {
-                orderId : this.orderId
-            }
-            this.axios.post("/api/v1/oms/getOrderResult",map)
-                .then((res) => {
-                    console.log(res)
-                if (res.status == 200) {
-                    this.stepList = res.data
-                } else {
-                    this.$message.error("展示失败!");
-                }
-            });
-            console.log(this.stepList)
-        },
-        getRequirementMaterial1(row) {
-        // 记录重复点击次数
-        if (this.oldRow1 === row) {
-            this.oldRowCount1 += 1;
+      });
+      console.log(this.stepList);
+    },
+    getRequirementMaterial1(row) {
+      // 记录重复点击次数
+      if (this.oldRow1 === row) {
+        this.oldRowCount1 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.excelDom.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow1 != "") {
+        if (this.oldRow1 != row) {
+          if (this.oldRowCount1 % 2 === 1) {
+            this.$refs.excelDom.toggleRowExpansion(this.oldRow1);
+          } else {
+            this.oldRowCount1 = 1;
+          }
+        } else {
+          this.oldRow1 = null;
+          return;
         }
-        // 切换当前详情表
-        this.$refs.excelDom.toggleRowExpansion(row);
-        // 打开前关闭上一个详情表
-        if (this.oldRow1 != "") {
-            if (this.oldRow1 != row) {
-            if (this.oldRowCount1 % 2 === 1) {
-                this.$refs.excelDom.toggleRowExpansion(this.oldRow1);
-            } else {
-                this.oldRowCount1 = 1;
-            }
-            } else {
-            this.oldRow1 = null;
-            return;
-            }
+      }
+      // 重置上一个点击对象
+      this.oldRow1 = row;
+      this.getMaterial(row.orderId);
+    },
+    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) {
+          console.log(startTime);
+          console.log(endTime);
+          if (
+            getCookie("orgCode") == "dagangadmin" ||
+            getCookie("orgCode") == "zidonghuabu" ||
+            getCookie("orgCode") == "wuliuchuyunzhongxin"
+          ) {
+            this.option.requestUrl =
+              "/api/v1/tms/getAllTimeTaskResult?apiId=458&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          } else {
+            this.option.requestUrl =
+              "/api/v1/tms/getAllTimeTaskResult?apiId=458&userId=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i=" +
+              new Date();
+          }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
         }
-        // 重置上一个点击对象
-        this.oldRow1 = row;
-        this.getMaterial(row.orderId);
-        },
-        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) {
-                    console.log(startTime)
-                    console.log(endTime)
-                if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode") == "zidonghuabu"||getCookie("orgCode") == "wuliuchuyunzhongxin"){
-                    this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
-                }else{
-                    this.option.requestUrl = "/api/v1/tms/getAllTimeTaskResult?apiId=458&orgCode="+getCookie("userId")+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
-                }
-                } else {
-                this.startTime = null;
-                this.endTime = null;
-                this.$message.warning("开始时间要比结束时间早");
-                }
-            } else {
-               
-            }
-        },
-        getMaterial(orderId){
-            console.log(orderId)
-            this.axios.post("/api/v1/oms/getPauseTimeTaskDetail/" + orderId).then((res) => {
-                console.log(res)
-                this.tableData = res.data.data
-            })
-        },
+      } else {
+      }
+    },
+    getMaterial(orderId) {
+      console.log(orderId);
+      this.axios
+        .post("/api/v1/oms/getPauseTimeTaskDetail/" + orderId)
+        .then(res => {
+          console.log(res);
+          this.tableData = res.data.data;
+        });
     }
-}
+  }
+};
 </script>
 <style lang="scss">
-    .sale{
-        .top {
-            padding: 1.25rem 1.875rem;
-            .el-input{
-            width: 20%;
-            }
-        }
-    }
-    .el-table th.el-table__cell>.cell {
-        display: inline-block;
-        -webkit-box-sizing: border-box;
-        box-sizing: border-box;
-        position: relative;
-        vertical-align: middle;
-        padding-left: 10px;
-        padding-right: 10px;
-        width: 100%;
-        text-align: center;
-    }
-    .step {
-    text-align: center;
+.sale {
+  .top {
+    padding: 1.25rem 1.875rem;
+    .el-input {
+      width: 20%;
     }
-</style>
+  }
+}
+.el-table th.el-table__cell > .cell {
+  display: inline-block;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  position: relative;
+  vertical-align: middle;
+  padding-left: 10px;
+  padding-right: 10px;
+  width: 100%;
+  text-align: center;
+}
+.step {
+  text-align: center;
+}
+</style>

+ 299 - 78
src/views/inward/components/inwardSettlement/detailOrder.vue

@@ -47,7 +47,7 @@
             clearable
           ></el-input>
         </el-form-item>
-        <span>详单时间:</span>
+        <span>净重时间:</span>
         <el-date-picker
           v-model="startTime"
           type="datetime"
@@ -66,41 +66,28 @@
         <el-button type="primary" class="btn" @click="onclick">
           <i class="el-icon-search"></i>
         </el-button>
-        <el-button type="primary" @click="exportData()"
+        <el-button type="primary" @click="exportAllExcel"
           ><i class="el-icon-download"></i>Excel</el-button
         >
-        <!-- <span style="margin-left: 1rem;">合计净重:</span>
-        <el-input
-          v-model="totalNetWeight"
-          :disabled="true"
-          style="width: 120px;"
-        ></el-input>
-        <span style="margin-left: 1rem;">合计金额:</span>
-        <el-input
-          v-model="totalMoney"
-          :disabled="true"
-          style="width: 100px;"
-        ></el-input> -->
+        <el-button type="primary" @click="newSettle">生成详单</el-button>
       </el-form>
     </div>
     <div class="table">
       <el-tabs v-model="activeName" tab-click="handClick">
         <!-- 未结算 -->
         <el-tab-pane label="未结算" name="first">
-          <div class="table">
-            <dilTable
-              v-bind.sync="options1"
-              ref="excelDom"
-              @func="func"
-            ></dilTable>
-          </div>
+          <dilTable
+            v-bind.sync="options1"
+            ref="excelDom"
+            @func="func"
+          ></dilTable>
         </el-tab-pane>
         <!-- 已结算 -->
         <el-tab-pane label="已结算" name="second">
-          <dilTable v-bind.sync="options2"> </dilTable>
+          <dilTable v-bind.sync="options2" @func="func2"> </dilTable>
         </el-tab-pane>
         <el-tab-pane label="未生成详单" name="third">
-          <dilTable v-bind.sync="options3"> </dilTable>
+          <dilTable v-bind.sync="options3" @func="func3"> </dilTable>
         </el-tab-pane>
       </el-tabs>
     </div>
@@ -190,8 +177,6 @@ export default {
       newAddress: null,
       //新单价Id
       priceId: null,
-      //是否打开运输单价的模态框
-      addressDrawer: false,
       //运输单价的表格
       Address: {
         requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
@@ -201,7 +186,14 @@ export default {
       //缓存当前选中的运输单价
       priceMap: {},
       formLabelWidth: "125px",
-      tableTitle: "内转计重详单"
+      tableTitle: "内转计重详单",
+      exportAllList: [],
+      noSettleDetailsColumn: [],
+      settleDetailsColumn: [],
+      noDetailsColumn: [],
+      orderList1: [],
+      orderList2: [],
+      orderList3: []
     };
   },
   created() {
@@ -210,18 +202,234 @@ export default {
     this.options3GetRequestUrl();
   },
   methods: {
+    handClick() {
+      if (this.activeName == "first") {
+        this.options1GetRequestUrl();
+      } else if (this.activeName == "second") {
+        this.options2GetRequestUrl();
+      } else {
+        this.options3GetRequestUrl();
+      }
+    },
     func(res) {
-      console.log(res.list);
+      console.log(res);
+      this.noSettleDetailsColumn = res.columnData;
       var totalWeight = 0;
       var totalAllMoney = 0;
       res.list.forEach(e => {
-        console.log(e.resultNetWeight);
         totalWeight = totalWeight + e.resultNetWeight;
         totalAllMoney = totalAllMoney + e.detailsAmount;
-        console.log(e.detailsAmount);
       });
       this.totalNetWeight = totalWeight.toFixed(2) + "t";
       this.totalMoney = totalAllMoney.toFixed(2) + "元";
+      this.orderList1 = [];
+      res.list.forEach(e => {
+        let map = {
+          orderLineSeq: e.orderLineSeq,
+          orderId: e.orderId
+        };
+        this.orderList1.push(map);
+      });
+    },
+    func2(res) {
+      this.settleDetailsColumn = res.columnData;
+    },
+    func3(res) {
+      console.log(res.list);
+      console.log("res");
+      this.orderList3 = [];
+      res.list.forEach(e => {
+        let map = {
+          orderLineSeq: e.orderLineSeq,
+          orderId: e.orderId
+        };
+        this.orderList3.push(map);
+      });
+      this.noDetailsColumn = res.columnData;
+    },
+    newSettle() {
+      console.log(this.orderList);
+      let orderList = [];
+      if (this.activeName == "third") {
+        orderList = this.orderList3;
+      } else {
+        orderList = this.orderList1;
+      }
+      debugger;
+      this.axios
+        .post("/api/v1/bms/newInwardSettle", { orderIds: orderList })
+        .then(res => {
+          console.log(res);
+          this.$message.success("生成成功");
+          this.options3GetRequestUrl();
+        });
+    },
+    exportAllExcel() {
+      let startTime = null;
+      let endTime = null;
+      let orgCode = null;
+      let materialTypeNames = null;
+      let transRangeValues = null;
+      let shipperNames = null;
+      let capacityNo = null;
+      let carrierSsoId = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      if (getCookie("orgCode") == "chengyunshang") {
+        carrierSsoId = getCookie("userId");
+      }
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        orgCode = null;
+      } else {
+        orgCode = getCookie("orgCode");
+      }
+      if (this.screen == "车牌号") {
+        capacityNo = this.input;
+      }
+      if (this.screen == "承运起止范围") {
+        transRangeValues = this.input;
+      }
+      if (this.screen == "货物名称") {
+        materialTypeNames = this.input;
+      }
+      if (this.screen == "用车单位") {
+        shipperNames = this.input;
+      }
+      if (this.screen1 == "车牌号") {
+        capacityNo = this.input1;
+      }
+      if (this.screen1 == "承运起止范围") {
+        transRangeValues = this.input1;
+      }
+      if (this.screen1 == "货物名称") {
+        materialTypeNames = this.input1;
+      }
+      if (this.screen1 == "用车单位") {
+        shipperNames = this.input1;
+      }
+      if (this.activeName == "first") {
+        this.tableTitle = "未结算计费详单";
+        this.axios
+          .post(
+            "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&shipperNames=" +
+              shipperNames +
+              "&materialTypeNames=" +
+              materialTypeNames +
+              "&transRangeValues=" +
+              transRangeValues +
+              "&capacityNo=" +
+              capacityNo +
+              "&i" +
+              new Date() +
+              "&isPage=yes"
+          )
+          .then(res => {
+            console.log(res.data.data);
+            this.exportAllList = res.data.data;
+            this.exportAllReportToExcel(
+              this.tableTitle,
+              this.exportAllList,
+              this.noSettleDetailsColumn
+            );
+          });
+      } else if (this.activeName == "second") {
+        this.tableTitle = "已结算计费详单";
+        this.axios
+          .post(
+            "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&shipperNames=" +
+              shipperNames +
+              "&materialTypeNames=" +
+              materialTypeNames +
+              "&transRangeValues=" +
+              transRangeValues +
+              "&capacityNo=" +
+              capacityNo +
+              "&i" +
+              new Date() +
+              "&isPage=yes" +
+              "&orgCode=" +
+              orgCode
+          )
+          .then(res => {
+            this.exportAllList = res.data.data;
+            this.exportAllReportToExcel(
+              this.tableTitle,
+              this.exportAllList,
+              this.settleDetailsColumn
+            );
+          });
+      } else if (this.activeName == "third") {
+        this.tableTitle = "未生成计费详单数据";
+        this.axios
+          .post(
+            "/api/v1/bms/getNoInwardDetails?apiId=490" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&shipperNames=" +
+              shipperNames +
+              "&materialTypeNames=" +
+              materialTypeNames +
+              "&transRangeValues=" +
+              transRangeValues +
+              "&capacityNo=" +
+              capacityNo +
+              "&i" +
+              new Date() +
+              "&orgCode=" +
+              orgCode +
+              "&isPage=yes"
+          )
+          .then(res => {
+            this.exportAllList = res.data.data;
+            this.exportAllReportToExcel(
+              this.tableTitle,
+              this.exportAllList,
+              this.noDetailsColumn
+            );
+          });
+      }
+    },
+    //导出excel
+    exportAllReportToExcel(tableTitle, dataArr, columnData) {
+      var title = tableTitle;
+      let tHeader = [];
+      let filterVal = [];
+      columnData.forEach(e1 => {
+        if (tHeader.indexOf(e1.label) === -1) {
+          tHeader.push(e1.label);
+        }
+        if (filterVal.indexOf(e1.prop) === -1) {
+          filterVal.push(e1.prop);
+        }
+      });
+      //导出为excel
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        // let list = this.$refs.excelDom.dataTabel;
+        let data = dataArr.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+      });
     },
     //未结算数据
     options1GetRequestUrl() {
@@ -275,7 +483,8 @@ export default {
       }
     },
     options3GetRequestUrl() {
-      this.options3.requestUrl = "/api/v1/bms/getNoInwardDetails?apiId=490";
+      this.options3.requestUrl =
+        "/api/v1/bms/getNoInwardDetails?apiId=490&i=" + new Date();
     },
     toInsert() {
       this.$router.push("/insertCheckInventory");
@@ -329,54 +538,66 @@ export default {
       if (this.screen1 == "用车单位") {
         shipperNames = this.input1;
       }
-      this.options1.requestUrl =
-        "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0" +
-        "&startTime=" +
-        startTime +
-        "&endTime=" +
-        endTime +
-        "&shipperNames=" +
-        shipperNames +
-        "&materialTypeNames=" +
-        materialTypeNames +
-        "&transRangeValues=" +
-        transRangeValues +
-        "&capacityNo=" +
-        capacityNo +
-        "&i" +
-        new Date();
-      this.options2.requestUrl =
-        "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
-        "&startTime=" +
-        startTime +
-        "&endTime=" +
-        endTime +
-        "&shipperNames=" +
-        shipperNames +
-        "&materialTypeNames=" +
-        materialTypeNames +
-        "&transRangeValues=" +
-        transRangeValues +
-        "&capacityNo=" +
-        capacityNo +
-        "&i" +
-        new Date();
-      this.options3.requestUrl =
-        "/api/v1/bms/getNoInwardDetails?apiId=490" +
-        "&startTime=" +
-        startTime +
-        "&endTime=" +
-        endTime +
-        "&shipperNames=" +
-        shipperNames +
-        "&materialTypeNames=" +
-        materialTypeNames +
-        "&transRangeValues=" +
-        transRangeValues +
-        "&capacityNo=" +
-        capacityNo +
-        "&i" +
-        new Date();
+      if (this.activeName == "first") {
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0" +
+          "&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&shipperNames=" +
+          shipperNames +
+          "&materialTypeNames=" +
+          materialTypeNames +
+          "&transRangeValues=" +
+          transRangeValues +
+          "&capacityNo=" +
+          capacityNo +
+          "&i" +
+          new Date() +
+          "&orgCode=" +
+          orgCode;
+      }
+      if (this.activeName == "second") {
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
+          "&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&shipperNames=" +
+          shipperNames +
+          "&materialTypeNames=" +
+          materialTypeNames +
+          "&transRangeValues=" +
+          transRangeValues +
+          "&capacityNo=" +
+          capacityNo +
+          "&i" +
+          new Date() +
+          "&orgCode=" +
+          orgCode;
+      }
+      if (this.activeName == "third") {
+        this.options3.requestUrl =
+          "/api/v1/bms/getNoInwardDetails?apiId=490" +
+          "&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&shipperNames=" +
+          shipperNames +
+          "&materialTypeNames=" +
+          materialTypeNames +
+          "&transRangeValues=" +
+          transRangeValues +
+          "&capacityNo=" +
+          capacityNo +
+          "&i" +
+          new Date() +
+          "&orgCode=" +
+          orgCode;
+      }
     },
     //运输订单点击浏览的事件
     select() {

+ 125 - 24
src/views/inward/components/offsetSteel/saleSteelTruckOrder/kucunList.vue

@@ -80,6 +80,34 @@
           <el-button type="primary" class="btn" @click="onclick">
             <i class="el-icon-search"></i>
           </el-button>
+          <el-button type="primary" class="btn" @click="batchOperate"
+            >批量保存</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-autocomplete
+            class="inline-input"
+            v-model="receiveName"
+            :fetch-suggestions="querySearchConsignee"
+            placeholder="请输入收货单位名称"
+            @select="handleSelectionChange()"
+          >
+          </el-autocomplete>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            size="mini"
+            v-model="sendStationId"
+            @change="handleMulSendChange()"
+          >
+            <el-option
+              v-for="item in sendStationList"
+              :key="item.sendStationId"
+              :label="item.sendStation"
+              :value="item.sendStationId"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
       </el-form>
     </div>
@@ -95,8 +123,14 @@
         :cell-style="{ fontWeight: '700' }"
         class="table"
         :span-method="objectSpanMethod"
-        id="offsetSteel_kucunList_Table" individual-panel
+        id="offsetSteel_kucunList_Table"
+        individual-panel
+        @selection-change="
+          handleSelectionChange();
+          handleMulSendChange();
+        "
       >
+        <el-table-column type="selection" width="55"> </el-table-column>
         <el-table-column
           prop="index"
           width="50"
@@ -141,7 +175,6 @@
               v-model="scope.row.receiveName"
               :fetch-suggestions="querySearchConsignee"
               placeholder="请输入收货单位名称"
-              :trigger-on-focus="false"
               @select="handleSelectConsignee(scope.row, scope.$index)"
             >
               <template slot-scope="{ item }">
@@ -150,6 +183,34 @@
             </el-autocomplete>
           </template>
         </el-table-column>
+        <el-table-column
+          prop="sendStation"
+          label="车皮装车地点"
+          width="120px"
+          align="center"
+          column-key="sendStation"
+          :filters="[
+            { text: '专用线', value: '专用线' },
+            { text: '达州站', value: '达州站' }
+          ]"
+          :filter-method="filterSend"
+        >
+          <template slot-scope="scope">
+            <el-select
+              size="mini"
+              v-model="scope.row.sendStationId"
+              @change="changesendStation(scope.row)"
+            >
+              <el-option
+                v-for="item in sendStationList"
+                :key="item.sendStationId"
+                :label="item.sendStation"
+                :value="item.sendStationId"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
         <el-table-column
           prop="transInDep"
           label="调入部门"
@@ -203,28 +264,11 @@
         >
         </el-table-column>
         <el-table-column
-          prop="sendStation"
-          label="发站"
-          width="120px"
+          prop="isPoundSale"
+          label="重量"
           align="center"
-          column-key="sendStation"
-          :filters="[
-            { text: '专用线', value: '专用线' },
-            { text: '达州站', value: '达州站' }
-          ]"
-          :filter-method="filterSend"
+          width="150px"
         >
-          <template slot-scope="scope">
-            <el-select size="mini" v-model="scope.row.sendStationId">
-              <el-option
-                v-for="item in sendStationList"
-                :key="item.sendStationId"
-                :label="item.sendStation"
-                :value="item.sendStationId"
-              >
-              </el-option>
-            </el-select>
-          </template>
         </el-table-column>
         <el-table-column
           prop="operate"
@@ -298,7 +342,9 @@ export default {
       pos: null,
       sendStationList: [],
       //收货客户列表
-      consigneeList: []
+      consigneeList: [],
+      receiveName: null,
+      sendStationId: null
     };
   },
   created() {
@@ -308,6 +354,44 @@ export default {
     this.information();
   },
   methods: {
+    batchOperate() {
+      console.log(this.$refs.tableRef.data);
+      this.axios
+        .post(
+          "/api/v1/ams/batchUpdateInwardConsignee",
+          this.$refs.tableRef.data
+        )
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("批量保存成功");
+            this.getRequestUrl();
+          }
+        });
+    },
+    handleSelectionChange() {
+      //批量绑定收货客户
+      let selection = this.$refs.tableRef.selection;
+      console.log("selection:", selection);
+      if (!selection) return;
+      this.consigneeList.forEach(e => {
+        if (e.consigneeCompanyName == this.receiveName) {
+          selection.forEach(row => {
+            row.receiveName = e.consigneeCompanyName;
+            row.consigneeId = e.consigneeId;
+          });
+        }
+      });
+    },
+    handleMulSendChange() {
+      //批量绑定发站
+      let selection = this.$refs.tableRef.selection;
+      console.log("selection:", selection);
+      if (!selection || !this.sendStationId) return;
+      selection.forEach(row => {
+        row.sendStationId = this.sendStationId;
+        this.changesendStation(row);
+      });
+    },
     handleSelectConsignee(row, index, item) {
       console.log(row);
       this.consigneeList.forEach(e => {
@@ -318,7 +402,7 @@ export default {
     },
     //以下是收货单位边输边查搜索
     querySearchConsignee(queryString, cb) {
-      if (queryString.length > 3) {
+      if (queryString && queryString.length > 3) {
         this.axios
           .post("/api/v1/uc/getConsigneeByLike?index=" + queryString)
           .then(res => {
@@ -335,6 +419,15 @@ export default {
               cb(results);
             }
           });
+      } else {
+        //历史收货客户
+        this.axios.post("/api/v1/uc/getConsigneeHistory").then(res => {
+          if (res.data.code == "200") {
+            console.log(res);
+            this.consigneeList = res.data.data;
+            cb(this.consigneeList);
+          }
+        });
       }
     },
     createFilterConsignee(queryString) {
@@ -387,6 +480,14 @@ export default {
         };
       }
     },
+    //修改发站
+    changesendStation(row) {
+      this.axios.post("/api/v1/ams/updateInwardConsignee", row).then(res => {
+        if (res.data.code == "200") {
+          this.$message.success("保存成功");
+        }
+      });
+    },
     operate(row) {
       this.axios
         .post("/api/v1/ams/updateInwardConsignee", row)

+ 135 - 27
src/views/inward/components/offsetSteel/saleSteelTruckOrder/platformStockInfo.vue

@@ -58,6 +58,9 @@
           <el-button type="primary" class="btn" @click="onclick">
             <i class="el-icon-search"></i>
           </el-button>
+          <el-button type="primary" class="btn" @click="batchOperate"
+            >批量保存</el-button
+          >
         </el-form-item>
       </el-form>
     </div>
@@ -74,6 +77,7 @@
         :summary-method="getSummaries"
         show-summary
         class="table"
+        :span-method="objectSpanMethod"
       >
         <el-table-column width="50" label="序号" align="center" type="index">
         </el-table-column>
@@ -191,24 +195,24 @@
         >
         </el-table-column>
         <el-table-column
-          prop="strawMats"
-          label="草垫根数"
+          prop="orderNum"
+          label="运输订单号"
           align="center"
           width="150px"
         >
-          <template slot-scope="scope">
-            <el-input
-              v-model.number="scope.row.strawMats"
-              placeholder="草垫根数"
-            >
-            </el-input>
-          </template>
         </el-table-column>
         <el-table-column
-          prop="orderNum"
-          label="运输订单号"
+          prop="wgmDelete"
+          label="入库状态"
           align="center"
           width="150px"
+          column-key="wgmDelete"
+          :filters="[
+            { text: '入库', value: '入库' },
+            { text: '出库', value: '出库' },
+            { text: '待入库', value: '待入库' }
+          ]"
+          :filter-method="filterDeleted"
         >
         </el-table-column>
         <el-table-column
@@ -237,17 +241,6 @@
             </el-input>
           </template>
         </el-table-column>
-        <el-table-column
-          prop="wagonWeight"
-          label="标重"
-          align="center"
-          width="150px"
-        >
-          <template slot-scope="scope">
-            <el-input v-model.number="scope.row.wagonWeight" placeholder="标重">
-            </el-input>
-          </template>
-        </el-table-column>
         <el-table-column
           prop="wagonBillWeight"
           label="计费吨位"
@@ -281,7 +274,7 @@
           prop="number"
           label="票号"
           align="center"
-          width="150px"
+          width="180px"
         >
         </el-table-column>
         <el-table-column
@@ -318,6 +311,14 @@ export default {
         {
           value: "收货单位",
           lable: "收货单位"
+        },
+        {
+          value: "车皮号",
+          lable: "车皮号"
+        },
+        {
+          value: "到站",
+          lable: "到站"
         }
       ],
       input: null,
@@ -331,7 +332,9 @@ export default {
         "materialNum"
       ],
       operateName: "编辑",
-      unloadPointList: []
+      unloadPointList: [],
+      spanArr: [],
+      mergeList: [""]
     };
   },
   created() {
@@ -341,6 +344,47 @@ export default {
     this.showSummariesPosition();
   },
   methods: {
+    batchOperate() {
+      this.$refs.tableRef.data.forEach((e, index) => {
+        this.$refs.tableRef.data.forEach((item, index) => {
+          if (
+            item.unloadPointId == null &&
+            e.consigneeId == item.consigneeId &&
+            e.consigneeId != null &&
+            e.unloadPointId != null
+          ) {
+            item.unloadPointId = e.unloadPointId;
+            item.unloadPoint = e.unloadPoint;
+          }
+        });
+      });
+      this.$refs.tableRef.data.forEach(row => {
+        row.personnelSsoId = getCookie("userId");
+        if (
+          (typeof row.EnStation == "object" ||
+            typeof row.EnStation == "string") &&
+          row.EnStation != null
+        ) {
+          row.EnStation = sjTime(new Date(row.EnStation));
+        }
+        if (
+          (typeof row.OutStation == "object" ||
+            typeof row.OutStation == "string") &&
+          row.OutStation != null
+        ) {
+          row.OutStation = sjTime(new Date(row.OutStation));
+        }
+      });
+      this.axios
+        .post("/api/v1/wms/listAfterInwardOutbound", this.$refs.tableRef.data)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("批量保存成功");
+            this.getRequestUrl();
+          }
+        });
+      console.log(this.$refs.tableRef.data);
+    },
     handleSelectWarehouse(row, index, item) {
       console.log(item);
       this.unloadPointList.forEach(e => {
@@ -419,6 +463,19 @@ export default {
     onclick() {
       let startTime = null;
       let endTime = null;
+      let wagonNo = null;
+      let consigneeName = null;
+      let sendStation = null;
+      let toTheStation = null;
+      if (this.screen == "发站") {
+        sendStation = this.input;
+      } else if (this.screen == "到站") {
+        toTheStation = this.input;
+      } else if (this.screen == "收货单位") {
+        consigneeName = this.input;
+      } else if (this.screen == "车皮号") {
+        wagonNo = this.input;
+      }
       if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime);
         endTime = sjTime(this.endTime);
@@ -428,11 +485,22 @@ export default {
           "/api/v1/oms/getWagonShippingDetails?startTime=" +
             startTime +
             "&endTime=" +
-            endTime
+            endTime +
+            "&wagonNo=" +
+            wagonNo +
+            "&consigneeName=" +
+            consigneeName +
+            "&toTheStation=" +
+            toTheStation +
+            "&sendStation=" +
+            sendStation +
+            "&i=" +
+            new Date()
         )
         .then(res => {
           this.tableData = res.data.data;
           this.showSummariesPosition();
+          this.getSpanArr();
         });
     },
     //获取后台数据
@@ -445,11 +513,14 @@ export default {
         .then(res => {
           console.log(res.data.data);
           this.tableData = res.data.data;
+          this.getSpanArr();
           this.showSummariesPosition();
         });
     },
     //刷新
     refresh() {
+      this.screen = null;
+      this.input = null;
       this.getRequestUrl();
     },
     //筛选发站
@@ -460,6 +531,10 @@ export default {
     filterType(value, row, column) {
       return row.orderType === value;
     },
+    //筛选是否入库数据
+    filterDeleted(value, row, column) {
+      return row.wgmDelete === value;
+    },
     //将合计行置顶
     showSummariesPosition() {
       const table = document.querySelector(".table");
@@ -489,16 +564,49 @@ export default {
                 return prev;
               }
             }, 0);
-            sums[index];
+            sums[index] = sums[index].toFixed(2);
+            // console.log("sums");
+            // console.log(sums[index]);
           } else {
             sums[index] = "N/A";
           }
         }
         //遍历数组,找到符合条件的列
       });
-
       return sums;
     },
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          data[i].group = i;
+          this.pos = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].trainOrderId === data[i - 1].trainOrderId) {
+            this.spanArr[this.pos] += 1;
+            data[i].group = data[i - 1].group;
+            this.spanArr.push(0);
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+            data[i].group = data[i - 1].group + 1;
+          }
+        }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeList.includes(column.property)) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
     //导出Excel
     exportAllReportToExcel() {
       console.log(this.$refs.tableRef);

+ 23 - 70
src/views/inward/components/offsetSteel/saleSteelTruckOrder/saleTruckPreview.vue

@@ -72,11 +72,11 @@
         :row-style="{ height: '30px' }"
         :cell-style="{ fontWeight: '700' }"
       >
-        <el-table-column type="selection" width="55" :selectable="selectInit">
+        <el-table-column type="selection" width="40" :selectable="selectInit">
         </el-table-column>
         <el-table-column
           prop="index"
-          width="50"
+          width="40"
           label="序号"
           align="center"
           :resizable="false"
@@ -123,7 +123,7 @@
           column-key="capacityNo"
           label="车牌号"
           align="center"
-          width="250px"
+          width="200px"
         >
           <template slot-scope="scope">
             <el-autocomplete
@@ -142,11 +142,18 @@
             >
           </template>
         </el-table-column>
+        <el-table-column
+          prop="toTheStation"
+          label="到站"
+          align="center"
+          width="100px"
+        >
+        </el-table-column>
         <el-table-column
           prop="materialName"
           label="物资名称"
           align="center"
-          width="150px"
+          width="100px"
         >
         </el-table-column>
         <el-table-column prop="materialSpe" label="物资规格" align="center">
@@ -155,7 +162,7 @@
           prop="materialNum"
           label="物资件数"
           align="center"
-          width="150px"
+          width="100px"
         >
           <!-- <template slot-scope="scope">
             <button
@@ -193,14 +200,6 @@
           column-key="transInDep"
         >
         </el-table-column>
-        <el-table-column
-          prop="transOutDep"
-          label="调出部门"
-          width="120px"
-          align="center"
-          column-key="transOutDep"
-        >
-        </el-table-column>
         <el-table-column
           prop="transInWarehouse"
           label="调入仓库"
@@ -209,8 +208,7 @@
           column-key="transInWarehouse"
         >
         </el-table-column>
-        <el-table-column prop="netWeight" label="净重"> </el-table-column>
-        <el-table-column prop="entryGateTime" label="进厂时间" width="130px">
+        <el-table-column prop="netWeight" label="净重" align="center"></el-table-column>
         </el-table-column>
         <el-table-column
           prop="carrierName"
@@ -237,12 +235,20 @@
           </template>
         </el-table-column>
         <el-table-column
-          prop="orderNo"
+          prop="orderNumber"
           label="运输订单号"
           width="180px"
           align="center"
         >
         </el-table-column>
+        <el-table-column
+          prop="transOutDep"
+          label="调出部门"
+          width="120px"
+          align="center"
+          column-key="transOutDep"
+        >
+        </el-table-column>
         <el-table-column
           prop="capacityTel"
           label="司机电话"
@@ -271,58 +277,6 @@
           align="center"
         >
         </el-table-column>
-        <!-- <el-table-column
-          label="操作"
-          fixed="right"
-          width="120px"
-          align="center"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              size="small"
-              @click="closeEasEntryId(scope.row)"
-              v-if="scope.row.deletedStatus == null"
-              >关闭分录</el-button
-            >
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="操作"
-          fixed="right"
-          width="120px"
-          align="center"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              size="small"
-              @click="deleteEasEntryId(scope.row)"
-              v-if="
-                scope.row.carStatus == 4 ||
-                scope.row.carStatus == 5 ||
-                scope.row.carStatus == null
-              "
-              >关闭车辆</el-button
-            >
-          </template>
-        </el-table-column> -->
-        <!-- <el-table-column
-          label="操作"
-          fixed="right"
-          width="120px"
-          align="center"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              size="small"
-              @click="adverseCloseSaleMaterial(scope.row)"
-              v-if="scope.row.deletedStatus != null"
-              >反关闭分录</el-button
-            >
-          </template>
-        </el-table-column> -->
       </el-table>
     </div>
     <!-- 多拼弹出层-->
@@ -666,6 +620,7 @@ export default {
     updateCapacity(row) {
       row.isIwardSteel = 4;
       row.saleOrderMaterialId = row.saleOrderId;
+      row.capacityId = row.newsCapacityId;
       if (row.newsCapacityId == null) {
         this.$message.warning("请先注册车牌号或者选中弹出后再提交!");
         return;
@@ -1151,8 +1106,6 @@ export default {
     },
     //获取钢材订单报表
     getSteelReport() {
-      let carrierSsoId = null;
-      let saler = null;
       this.axios
         .post(
           "/api/v1/tms/getInwardSaleSteelOrder?startTime=" +

+ 150 - 127
src/views/inward/components/truckAppoint/addPlan.vue

@@ -2,44 +2,64 @@
 <template>
   <div class="addInwardPlan">
     <page-title>新增计划</page-title>
-  <div class="carrier form">
-  <el-form  class="demo-form-inline"  label-width="80px" label-position="left">
-  <el-form-item label="承运商">
-    <el-autocomplete
-      class="inline-input"
-      v-model="state2"
-      :fetch-suggestions="querySearch"
-      placeholder="请输入承运商名称"
-      :trigger-on-focus="false"
-      @select="handleSelect"
-    >
-  <template slot-scope="{ item }">
-    <div class="name">{{ item.value }}</div>
-  </template>
-    </el-autocomplete>
-  </el-form-item>
-  <div class="truckNum">
-    <el-form  class="demo-form-inline"  label-width="80px" label-position="left">
-    <el-form-item label="车数">
-    <el-input   v-model="planTruckNumber" placeholder="非必填" class="input"></el-input>
-    </el-form-item>
-  </el-form>
-  </div>
-</el-form>
-</div>
+    <div class="carrier form">
+      <el-form
+        class="demo-form-inline"
+        label-width="80px"
+        label-position="left"
+      >
+        <el-form-item label="承运商">
+          <el-autocomplete
+            class="inline-input"
+            v-model="state2"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入承运商名称"
+            :trigger-on-focus="false"
+            @select="handleSelect"
+          >
+            <template slot-scope="{ item }">
+              <div class="name">{{ item.value }}</div>
+            </template>
+          </el-autocomplete>
+        </el-form-item>
+        <div class="truckNum">
+          <el-form
+            class="demo-form-inline"
+            label-width="80px"
+            label-position="left"
+          >
+            <el-form-item label="车数">
+              <el-input
+                v-model="planTruckNumber"
+                placeholder="非必填"
+                class="input"
+              ></el-input>
+            </el-form-item>
+          </el-form>
+        </div>
+      </el-form>
+    </div>
     <template>
-			<div>		
-			<dilTable v-bind.sync="first" @radio-change="currentRadioChange" ref="table">
-            <el-table-column fixed="right" label="操作" width="120">
-                <template slot-scope="scope">
-                  <el-button type="text" size="mini" @click="deleteRequirement(scope)">
-                    拒绝需求
-                  </el-button>
-                </template>
-              </el-table-column>
-			</dilTable>
+      <div>
+        <mergeRowTable
+          v-bind.sync="first"
+          @radio-change="currentRadioChange"
+          ref="table"
+        >
+          <el-table-column fixed="right" label="操作" width="120">
+            <template slot-scope="scope">
+              <el-button
+                type="text"
+                size="mini"
+                @click="deleteRequirement(scope)"
+              >
+                拒绝需求
+              </el-button>
+            </template>
+          </el-table-column>
+        </mergeRowTable>
       </div>
-		</template>
+    </template>
     <div class="button-box">
       <el-button type="primary" @click="makeSure">确认新增</el-button>
       <el-button type="primary" @click="cancel">返回</el-button>
@@ -54,82 +74,86 @@ export default {
   data() {
     return {
       restaurants: [],
-      state2:null,
-      planTruckNumber:null,
-      carrierId:null,
-      requirementId:null,
+      state2: null,
+      planTruckNumber: null,
+      carrierId: null,
+      requirementId: null,
       form: {},
-      first:{
-        requestUrl:"/api/v1/ams/getTruckRequirementList?apiId=250&requirementStatus=2",
+      first: {
+        requestUrl:
+          "/api/v1/ams/getTruckRequirementList?apiId=250&requirementStatus=2",
         selectionType: "radio",
-				mapList: {},
+        columnIndexs: [0, 1, 2, 3, 4, 20, 21, 22],
+        comparison: "requirementNumber",
+        mapList: {}
       },
       numberValidateForm: {
-          planTruckNumber: null,
-      },
+        planTruckNumber: null
+      }
     };
   },
   methods: {
-    handleSelect(item){
-      this.carrierId = item.carrierId
-      this.state2 = item.carrierName 
+    handleSelect(item) {
+      this.carrierId = item.carrierId;
+      this.state2 = item.carrierName;
     },
-        //搜索
+    //搜索
     querySearch(queryString, cb) {
-        this.axios.post('/api/v1/uc/getCarrierMesByLike?index='+this.state2).then((res)=>{
-        if(res.data.code == "200"){
-          console.log(res)
-          var restaurants = res.data.data
-           var results = queryString ? restaurants.filter(this.createFilter(queryString)) :restaurants;
-          // 调用 callback 返回建议列表的数据
-          console.log(results,"results");
-          cb(results);
-        }
-      })
-       
-      },
-      createFilter(queryString) {
-        return (restaurants) => {
-          return (restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
-    currentRadioChange(selection){
-        this.mapList = selection
-        this.requirementId = selection.requirementId
-        console.log(this.mapList)
+      this.axios
+        .post("/api/v1/uc/getCarrierMesByLike?index=" + this.state2)
+        .then(res => {
+          if (res.data.code == "200") {
+            console.log(res);
+            var restaurants = res.data.data;
+            var results = queryString
+              ? restaurants.filter(this.createFilter(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            console.log(results, "results");
+            cb(results);
+          }
+        });
+    },
+    createFilter(queryString) {
+      return restaurants => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    currentRadioChange(selection) {
+      this.mapList = selection;
+      this.requirementId = selection.requirementId;
+      console.log(this.mapList);
     },
     // 新增
     makeSure() {
-      console.log(typeof(this.planTruckNumber))  
-      if(this.carrierId == null){
-        this.$alert('请输入承运商!')
-        return
-      }else if(this.requirementId== null){
-        this.$alert('请选择需要制定计划的需求!')
-        return
+      console.log(typeof this.planTruckNumber);
+      if (this.carrierId == null || this.state2 == "") {
+        this.$alert("请输入承运商!");
+        return;
+      } else if (this.requirementId == null) {
+        this.$alert("请选择需要制定计划的需求!");
+        return;
       }
       let plan = {
-        requirementId : this.mapList.requirementId,
+        requirementId: this.mapList.requirementId,
         planTruckNumber: Number(this.planTruckNumber),
         carrierId: this.carrierId
       };
-      this.axios
-        .post(
-          "/api/v1/ams/addTruckPlan",
-          plan
-        )
-        .then((res) => {
-            console.log(res)
-          if (res.data.code == 200) {
-            this.$message({
-              type: "success",
-              message: "新增成功!",
-            });            
-            this.$router.go(-1);
-          } else {
-            this.$message.error("新增失败!");
-          }
-        });
+      this.axios.post("/api/v1/ams/addTruckPlan", plan).then(res => {
+        console.log(res);
+        if (res.data.code == 200) {
+          this.$message({
+            type: "success",
+            message: "新增成功!"
+          });
+          this.$router.go(-1);
+        } else {
+          this.$message.error("新增失败!");
+        }
+      });
     },
     // 返回
     cancel() {
@@ -140,24 +164,26 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
             .post(
               "/api/v1/ams/deleteTruckRequirement/" + scope.row.requirementId
             )
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "拒绝成功!",
+                  message: "拒绝成功!"
                 });
-                this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=250&requirementStatus=2&i=" + new Date()
+                this.first.requestUrl =
+                  "/api/v1/ams/getTruckRequirementList?apiId=250&requirementStatus=2&i=" +
+                  new Date();
               } else {
                 this.$message({
                   message: "拒绝失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -165,41 +191,38 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "删除操作已取消!",
+            message: "删除操作已取消!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
 
 <style lang="scss" scoped>
-.addInwardPlan{
-.carrier{
-  display: inline-block !important;
-  margin-left: 38%;
-  .el-input{
-    width:250px
-  }
-  .input{
-    margin-left: -10px;
+.addInwardPlan {
+  .carrier {
+    display: inline-block !important;
+    margin-left: 38%;
+    .el-input {
+      width: 250px;
+    }
+    .input {
+      margin-left: -10px;
+    }
+    .el-form {
+      padding: 10px;
+    }
   }
-  .el-form{
-    padding: 10px;  
+  .truckNum {
+    .el-input {
+      width: 250px;
+    }
   }
-}
-.truckNum {
-  .el-input{
-    width: 250px;
+  .button-box {
+    display: flex;
+    justify-content: center;
+    margin-left: 25px !important;
   }
 }
-.button-box
-{
-  display: flex;
-  justify-content: center;
-  margin-left: 25px !important;
-}
-}
-
-
 </style>

+ 129 - 48
src/views/inward/components/truckAppoint/addRequirement2.vue

@@ -39,7 +39,7 @@
         </el-select>
       </div>
       <div class="DueTime">
-        <el-form :inline="true" style="margin-top: 0.5rem;">
+        <el-form :inline="true" style="margin-top: 0.5rem">
           <el-form-item>
             <el-switch
               v-model="isOpenDueTime"
@@ -52,7 +52,7 @@
             <el-form-item v-if="isOpenDueTime == true">
               <label
                 class="el-form-item__label"
-                style="width: auto; margin-left:10px;"
+                style="width: auto; margin-left: 10px"
                 >截止日期</label
               >
               <el-date-picker
@@ -81,39 +81,36 @@
             </el-form-item>
           </el-form>
         </div>
-        <el-drawer
-          title="选择车辆类型"
-          :visible.sync="drawer2"
-          direction="rtl"
-          size="40%"
-          :show-close="false"
-        >
-          <div style="margin-left:-300px">
+        <div class="drawSty">
+          <el-drawer
+            :visible.sync="drawer2"
+            direction="rtl"
+            size="40%"
+            :show-close="false"
+          >
             <el-input
               placeholder="请输入内容"
               v-model="inputCapacityType"
-              style="margin-left:20px;width: 250px"
               clearable
+              style="margin-left:20px"
             >
             </el-input
             ><el-button type="primary" class="btn" @click="onclickCapacity">
               <i class="el-icon-search"></i>查询
             </el-button>
-          </div>
-
-          <!-- <el-button @click="open">取消</el-button> -->
-
-          <div class="tablecls">
-            <dilTable
-              ref="options3"
-              v-bind.sync="options3"
-              @radio-change="selectionChange1"
-              :drawer="aaadrawer"
-            >
-            </dilTable>
-          </div>
-        </el-drawer>
+            <div class="tablecls">
+              <dilTable
+                ref="options3"
+                v-bind.sync="options3"
+                @radio-change="selectionChange1"
+                :drawer="aaadrawer"
+              >
+              </dilTable>
+            </div>
+          </el-drawer>
+        </div>
       </div>
+      <!-- 选择物资 -->
       <div class="materialDrawer">
         <el-form :inline="true" class="demo-form-inline" label-width="80px">
           <el-form-item label="选择物资"> </el-form-item>
@@ -173,7 +170,7 @@
                   <!-- 装货点 -->
                   <template
                     v-if="item.prop == 'requirementPlatformName'"
-                    style="width:400px"
+                    style="width: 400px"
                   >
                     <el-input
                       class="textinput"
@@ -246,6 +243,7 @@
           direction="rtl"
           size="40%"
           :show-close="false"
+          :before-close="handleClose2"
         >
           <el-input placeholder="请输入内容" v-model="inputMaterial" clearable>
           </el-input
@@ -253,7 +251,7 @@
             <i class="el-icon-search"></i>查询
           </el-button>
           <!-- <el-button @click="open">取消</el-button> -->
-          <el-button type="primary" @click="makeSure1">确定</el-button>
+          <!-- <el-button type="primary" @click="makeSure1">确定</el-button> -->
           <div class="tablecls">
             <!-- 查询所有的物资 -->
             <dilTable
@@ -275,7 +273,7 @@
         <el-input
           placeholder="请输入内容"
           v-model="input"
-          style="margin-top: 5px; margin-left: 10px; width: 250px"
+          style="width: 250px"
           clearable
         >
         </el-input>
@@ -308,9 +306,7 @@
       </el-drawer>
     </div>
     <div class="button-box">
-      <el-button type="primary" @click="makeSure" :disabled="disabled"
-        >确认新增</el-button
-      >
+      <el-button type="primary" @click="makeSure">确认新增</el-button>
       <el-button type="primary" @click="cancel">返回</el-button>
     </div>
   </div>
@@ -573,6 +569,63 @@ export default {
     },
     handleClose(done) {
       done();
+      //执行选择
+    },
+    handleClose2(done) {
+      console.log(this.tableData.length);
+      console.log("this.form.requirementType:", this.form.requirementType);
+      if (
+        this.tableData.length > 0 &&
+        this.selectionList1.length > 0 &&
+        this.form.requirementType != "倒库"
+      ) {
+        this.$message.warning("一个需求只允许填写一个物资");
+        return;
+      }
+      if (
+        this.selectionList1.length > 1 &&
+        this.form.requirementType != "倒库"
+      ) {
+        this.$message.warning("一个需求只允许填写一个物资");
+        return;
+      }
+      this.selectionList1.forEach(e => {
+        // console.log(e.materialModel,e.materialSpecification)
+        if (e.materialSpecification == null) {
+          e.materialSpecification = "";
+        }
+        if (e.materialModel == null) {
+          e.materialModel = "";
+        }
+        var addmap = {
+          materialName:
+            e.materialName + e.materialSpecification + e.materialModel,
+          materialId: e.materialId
+        };
+        this.tableData.push(addmap);
+      });
+      this.selectionList1 = [];
+      this.table = false;
+      done();
+    },
+    refreshTable() {
+      var arr = this.tableData;
+      this.tableData = [];
+      arr.forEach(e => {
+        var addmap = {
+          materialName: e.materialName,
+          materialId: e.materialId,
+          requirementPlatformName: e.requirementPlatformName,
+          truckPoint1: e.truckPoint1,
+          requirementPlatformId: e.requirementPlatformId,
+          requirementUnloadUnitId: e.requirementUnloadUnitId,
+          orderMaterialNumber: e.orderMaterialNumber,
+          orderMaterialWeight: e.orderMaterialWeight,
+          loadPointName: e.loadPointName,
+          unloadPointName: e.unloadPointName
+        };
+        this.tableData.push(addmap);
+      });
     },
     onclickMaterial() {
       if (this.inputMaterial == null) {
@@ -592,7 +645,6 @@ export default {
             "&index=" +
             this.inputMaterial;
         }
-        this.inputMaterial = null;
       }
     },
     onclickCapacity() {
@@ -602,7 +654,6 @@ export default {
         this.options3.requestUrl =
           "/api/v1/uc/getCapacityType?apiId=460&index=" +
           this.inputCapacityType;
-        this.inputCapacityType = null;
       }
     },
     //删除行
@@ -614,11 +665,18 @@ export default {
     // 返回主界面
     makeSure1() {
       console.log(this.tableData.length);
-      if (this.tableData.length > 0 && this.selectionList1.length > 0) {
+      if (
+        this.tableData.length > 0 &&
+        this.selectionList1.length > 0 &&
+        this.form.requirementType != "倒库"
+      ) {
         this.$message.warning("一个需求只允许填写一个物资");
         return;
       }
-      if (this.selectionList1.length > 1) {
+      if (
+        this.selectionList1.length > 1 &&
+        this.form.requirementType != "倒库"
+      ) {
         this.$message.warning("一个需求只允许填写一个物资");
         return;
       }
@@ -739,11 +797,15 @@ export default {
     },
     // 新增
     makeSure() {
-      console.log(this.form.isMineral);
-      // 判断当前装机是否选择了装机必填
-      console.log("进来了");
-      console.log(this.whether);
-      console.log(this.installremark);
+      // console.log(this.form.isMineral);
+      // // 判断当前装机是否选择了装机必填
+      // console.log("进来了");
+      // console.log(this.whether);
+      // console.log(this.installremark);
+      if (this.tableData.length > 1 && this.form.requirementType != "倒库") {
+        this.$message.warning("非倒库需求只允许填写一个物资");
+        return;
+      }
       if (this.whether == 2 && this.installremark == "") {
         console.log("确实进来了");
         this.$message.warning("请选择装机必填");
@@ -801,7 +863,7 @@ export default {
       }
       // console.log(this.tableData)
       var DueTime;
-      if (this.DueTime == null) {
+      if (this.DueTime == null && this.isOpenDueTime == true) {
         this.$message.warning("截止日期必填");
         this.disabled = false;
         return;
@@ -966,13 +1028,24 @@ export default {
       display: flex;
       justify-content: center;
       align-items: center;
-      margin-right: 500px;
-      .el-form-item {
-        .el-form-item__label {
-          width: 170px !important;
-        }
-        .el-input {
-          width: 210px !important;
+      margin-right: 600px;
+      // margin-left: -20px;
+      background-color: yellow;
+      .preview-group {
+        background-color: blue;
+        ::v-deep .el-form-item {
+          background-color: blue;
+          .el-form-item__label {
+            width: 170px !important;
+            background-color: blue;
+          }
+          ::v-deep .el-form-item__content {
+            background-color: red;
+            width: 300px;
+          }
+          .el-input {
+            width: 210px !important;
+          }
         }
       }
     }
@@ -986,3 +1059,11 @@ export default {
   }
 }
 </style>
+<style>
+.el-drawer__body {
+  overflow: auto;
+}
+.el-drawer__container ::-webkit-scrollbar {
+  display: none;
+}
+</style>

+ 122 - 98
src/views/inward/components/truckAppoint/getRequirementOrder.vue

@@ -11,31 +11,28 @@
         返回
       </el-button>
     </div>
-     <!-- 车辆信息 -->
+    <!-- 车辆信息 -->
     <el-dialog
-        title="车辆信息"
-        :visible.sync="dialogTableVisible"
-        :before-close="handleClose"
+      title="车辆信息"
+      :visible.sync="dialogTableVisible"
+      :before-close="handleClose"
     >
       <el-input v-model="truckInput" style="width:250px"></el-input>
       <el-button type="primary" @click="clickTruck">查询</el-button>
-      <dilTable
-        v-bind.sync="truck"
-        @radio-change="currentRadioChange1"
-        >
+      <dilTable v-bind.sync="truck" @radio-change="currentRadioChange1">
       </dilTable>
       <span slot="footer" class="dialog-footer">
-      <el-button @click="cancelUpdate()">取 消</el-button>
-      <el-button type="primary" @click="updateTruckCapacity()"
-      >确 定</el-button>
+        <el-button @click="cancelUpdate()">取 消</el-button>
+        <el-button type="primary" @click="updateTruckCapacity()"
+          >确 定</el-button
+        >
       </span>
     </el-dialog>
     <template>
       <div>
         <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tab-pane label="待接收" name="first">
-            <dilTable v-bind.sync="first" ref="table">
-            </dilTable>
+            <dilTable v-bind.sync="first" ref="table"> </dilTable>
           </el-tab-pane>
           <el-tab-pane label="已接收" name="second">
             <dilTable v-bind.sync="second"> </dilTable>
@@ -54,134 +51,161 @@ export default {
   data() {
     return {
       inputText: "",
-      truckInput:null,
+      truckInput: null,
       userCarrierId: "",
       //是否弹出对话框
       dialogTableVisible: false,
       first: {
         //
-        requestUrl:
-          "" ,
+        requestUrl: ""
       },
       //车辆信息的表格
       truck: {
         requestUrl:
           "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + "",
         // 控制显示当选列
-        selectionType: "radio",
+        selectionType: "radio"
       },
       //选中的运力id
       capacityId: null,
       activeName: "first",
       second: {
-        requestUrl: "",
+        requestUrl: ""
       },
       third: {
-        requestUrl: "",
-      },
+        requestUrl: ""
+      }
     };
   },
   created() {
-      this.first.requestUrl =
-        "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=4" + "&requirementId=" + this.$route.params.requirementId
-      this.second.requestUrl =
-        "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=5" + "&requirementId=" + this.$route.params.requirementId
-      this.third.requestUrl =
-        "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=2" + "&requirementId=" + this.$route.params.requirementId
+    this.first.requestUrl =
+      "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=4" +
+      "&requirementId=" +
+      this.$route.params.requirementId;
+    this.second.requestUrl =
+      "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=5" +
+      "&requirementId=" +
+      this.$route.params.requirementId;
+    this.third.requestUrl =
+      "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=2" +
+      "&requirementId=" +
+      this.$route.params.requirementId;
   },
   methods: {
     getRequest() {
       this.first.requestUrl =
-        "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=4" + "&i=" + new Date() + "&requirementId=" + this.$route.params.requirementId
+        "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=4" +
+        "&i=" +
+        new Date() +
+        "&requirementId=" +
+        this.$route.params.requirementId;
       this.second.requestUrl =
-        "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=5" + "&i=" + new Date() + "&requirementId=" + this.$route.params.requirementId
+        "/api/v1/ams/getPlanOrder?apiId=455&orderStatus=5" +
+        "&i=" +
+        new Date() +
+        "&requirementId=" +
+        this.$route.params.requirementId;
     },
-    cancel(){
-        this.$router.go(-1)
+    cancel() {
+      this.$router.go(-1);
     },
     handleClick() {
-      this.getRequest()
+      this.getRequest();
     },
-    handleClose(done){
-      done()
-      this.$message.info("取消修改运力")
+    handleClose(done) {
+      done();
+      this.$message.info("取消修改运力");
     },
-    currentRadioChange1(row){
-      console.log(row)
-      this.capacityId = row.capacityId
+    currentRadioChange1(row) {
+      console.log(row);
+      this.capacityId = row.capacityId;
     },
-    getTruckRequestUrl(){
+    getTruckRequestUrl() {
       if (getCookie("orgCode") == "chengyunshang") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-        getCookie("userId") + "&test=" + new Date();
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date();
       } else {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null +  "&test=" + new Date();
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&test=" +
+          new Date();
       }
     },
     //修改运输订单
-    updatePlan(scope){
-      this.getTruckRequestUrl()
-      this.orderId = scope.row.orderId
-      this.dialogTableVisible = true
-      console.log(scope.row.orderId)
+    updatePlan(scope) {
+      this.getTruckRequestUrl();
+      this.orderId = scope.row.orderId;
+      this.dialogTableVisible = true;
+      console.log(scope.row.orderId);
     },
-    updateTruckCapacity(){
-        if(this.capacityId == null){
-            this.$message.error("未选中运力")
-            return
-        }
-        this.axios.post("/api/v1/oms/updateCapacityId",{
-          capacityId:this.capacityId,
-          orderId :this.orderId
-        }).then((res) =>{
-          if(res.data.code == "200"){
-            this.$message.success("修改运力成功")
-            this.dialogTableVisible = false
-            this.getRequest()
-            
-          }else{
-            this.$message.error("修改运力失败")
-            this.dialogTableVisible = false
-            this.getRequest()
-          }
+    updateTruckCapacity() {
+      if (this.capacityId == null) {
+        this.$message.error("未选中运力");
+        return;
+      }
+      this.axios
+        .post("/api/v1/oms/updateCapacityId", {
+          capacityId: this.capacityId,
+          orderId: this.orderId
         })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("修改运力成功");
+            this.dialogTableVisible = false;
+            this.getRequest();
+          } else {
+            this.$message.error("修改运力失败");
+            this.dialogTableVisible = false;
+            this.getRequest();
+          }
+        });
     },
-    clickTruck(){
-      this.truck.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&index=" + this.truckInput
+    clickTruck() {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        null +
+        "&index=" +
+        this.truckInput;
     },
-      //删除运输订单
-    deleteClick(scope){
-      this.$confirm('是否删除?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning',
-        }).then(() => {
-            this.axios
-            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
-            .then((res) => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "删除成功!",
-                });     
-                this.getRequest()
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning",
-                });
-              }
-            });
-        }).catch(() => {
+    //删除运输订单
+    deleteClick(scope) {
+      let map = {
+        orderId: scope.row.orderId,
+        userId: getCookie("userId")
+      };
+      this.$confirm("是否删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.axios.post("/api/v1/oms/closeOmstruckOrder", map).then(res => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "删除成功!"
+              });
+              this.getRequest();
+            } else {
+              this.$message({
+                message: "删除失败",
+                type: "warning"
+              });
+            }
+          });
+        })
+        .catch(() => {
           this.$message({
-            type: 'info',
-            message: '已取消删除'
-          });          
+            type: "info",
+            message: "已取消删除"
+          });
         });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss">

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

@@ -89,7 +89,7 @@
             </dilTable>
           </el-tab-pane>
           <el-tab-pane label="已下发" name="third">
-            <dilTable v-bind.sync="third" ref="table2">
+            <mergeRowTable v-bind.sync="third" ref="table2">
               <el-table-column
                 fixed="right"
                 align="center"
@@ -132,7 +132,7 @@
                   </el-form>
                 </template>
               </el-table-column>
-            </dilTable>
+            </mergeRowTable>
           </el-tab-pane>
           <!-- <el-tab-pane label="已完成" name="fourth">
             <dilTable
@@ -201,6 +201,8 @@ export default {
         mapList: []
       },
       third: {
+        columnIndexs:[0,1,2,3,4,5,9,10,13,16,21,22],
+        comparison: "requirementNumber",
         // second请求数据的地址
         requestUrl: ""
       },

+ 8 - 4
src/views/inward/components/truckAppoint/requirement.vue

@@ -36,7 +36,7 @@
       <div>
         <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tab-pane label="未下发" name="first">
-            <dilTable
+            <mergeRowTable
               v-bind.sync="first"
               @selection-change="selectionChange"
               ref="table"
@@ -52,10 +52,10 @@
                   </el-button>
                 </template>
               </el-table-column>
-            </dilTable>
+            </mergeRowTable>
           </el-tab-pane>
           <el-tab-pane label="已下发" name="second">
-            <dilTable
+            <mergeRowTable
               v-bind.sync="second"
               ref="table1"
               :isPagination="false"
@@ -71,7 +71,7 @@
                   >
                 </template>
               </el-table-column>
-            </dilTable>
+            </mergeRowTable>
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -92,9 +92,13 @@ export default {
         // first请求数据的地址
         requestUrl: "",
         selectionType: "select",
+        columnIndexs:[0,1,2,6,7,8,9,22],
+        comparison: "requirementNumber",
         mapList: []
       },
       second: {
+        columnIndexs:[0,1,5,6,7,8,9,21],
+        comparison: "requirementNumber",
         // second请求数据的地址
         requestUrl: ""
       },

+ 8 - 4
src/views/inward/components/truckAppoint/requirementOther.vue

@@ -44,7 +44,7 @@
       <div>
         <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tab-pane label="未下发" name="first">
-            <dilTable
+            <mergeRowTable
               v-bind.sync="first"
               @selection-change="selectionChange"
               ref="table1"
@@ -60,10 +60,10 @@
                   </el-button>
                 </template>
               </el-table-column>
-            </dilTable>
+            </mergeRowTable>
           </el-tab-pane>
           <el-tab-pane label="已下发" name="second">
-            <dilTable v-bind.sync="second" ref="table">
+            <mergeRowTable v-bind.sync="second" ref="table">
               <el-table-column fixed="right" label="操作" width="80">
                 <template slot-scope="scope">
                   <el-button
@@ -74,7 +74,7 @@
                   >
                 </template>
               </el-table-column>
-            </dilTable>
+            </mergeRowTable>
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -95,10 +95,14 @@ export default {
         // first请求数据的地址
         requestUrl: "",
         selectionType: "select",
+        columnIndexs:[0,1,2,6,7,8,9,22],
+        comparison: "requirementNumber",
         mapList: []
       },
       second: {
         // second请求数据的地址
+        columnIndexs:[0,1,5,6,7,8,9,21],
+        comparison: "requirementNumber",
         requestUrl: ""
       },
       tableData: [],

+ 18 - 16
src/views/inward/components/truckOrder/dispatchPlan.vue

@@ -288,28 +288,30 @@ export default {
     },
     //删除运输订单
     deleteClick(scope) {
+      let map = {
+        orderId: scope.row.orderId,
+        userId: getCookie("userId")
+      };
       this.$confirm("是否删除?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning"
       })
         .then(() => {
-          this.axios
-            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
-            .then(res => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "删除成功!"
-                });
-                this.getRequest();
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning"
-                });
-              }
-            });
+          this.axios.post("/api/v1/oms/closeOmstruckOrder", map).then(res => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "删除成功!"
+              });
+              this.getRequest();
+            } else {
+              this.$message({
+                message: "删除失败",
+                type: "warning"
+              });
+            }
+          });
         })
         .catch(() => {
           this.$message({

+ 126 - 96
src/views/inward/components/truckOrder/getPlanOrder.vue

@@ -11,23 +11,21 @@
         返回
       </el-button>
     </div>
-     <!-- 车辆信息 -->
+    <!-- 车辆信息 -->
     <el-dialog
-        title="车辆信息"
-        :visible.sync="dialogTableVisible"
-        :before-close="handleClose"
+      title="车辆信息"
+      :visible.sync="dialogTableVisible"
+      :before-close="handleClose"
     >
       <el-input v-model="truckInput" style="width:250px"></el-input>
       <el-button type="primary" @click="clickTruck">查询</el-button>
-      <dilTable
-        v-bind.sync="truck"
-        @radio-change="currentRadioChange1"
-        >
+      <dilTable v-bind.sync="truck" @radio-change="currentRadioChange1">
       </dilTable>
       <span slot="footer" class="dialog-footer">
-      <el-button @click="cancelUpdate()">取 消</el-button>
-      <el-button type="primary" @click="updateTruckCapacity()"
-      >确 定</el-button>
+        <el-button @click="cancelUpdate()">取 消</el-button>
+        <el-button type="primary" @click="updateTruckCapacity()"
+          >确 定</el-button
+        >
       </span>
     </el-dialog>
     <template>
@@ -40,7 +38,11 @@
                   <el-button type="text" size="mini" @click="updatePlan(scope)">
                     修改
                   </el-button>
-                  <el-button type="text" size="mini" @click="deleteClick(scope)">
+                  <el-button
+                    type="text"
+                    size="mini"
+                    @click="deleteClick(scope)"
+                  >
                     删除
                   </el-button>
                 </template>
@@ -64,134 +66,162 @@ export default {
   data() {
     return {
       inputText: "",
-      truckInput:null,
+      truckInput: null,
       userCarrierId: "",
       //是否弹出对话框
       dialogTableVisible: false,
       first: {
         //
-        requestUrl:""
+        requestUrl: ""
       },
       //车辆信息的表格
       truck: {
         requestUrl:
           "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + "",
         // 控制显示当选列
-        selectionType: "radio",
+        selectionType: "radio"
       },
       //选中的运力id
       capacityId: null,
       activeName: "first",
       second: {
-        requestUrl: "",
+        requestUrl: ""
       },
       third: {
-        requestUrl: "",
-      },
+        requestUrl: ""
+      }
     };
   },
   created() {
-      this.first.requestUrl =
-        "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=4" + "&planId=" + this.$route.params.planId
-      this.second.requestUrl =
-        "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=5" + "&planId=" + this.$route.params.planId
-      this.third.requestUrl =
-        "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=2" + "&planId=" + this.$route.params.planId
+    this.first.requestUrl =
+      "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=4" +
+      "&planId=" +
+      this.$route.params.planId;
+    this.second.requestUrl =
+      "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=5" +
+      "&planId=" +
+      this.$route.params.planId;
+    this.third.requestUrl =
+      "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=2" +
+      "&planId=" +
+      this.$route.params.planId;
   },
   methods: {
     getRequest() {
       this.first.requestUrl =
-        "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=4" + "&i=" + new Date() + "&planId=" + this.$route.params.planId
+        "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=4" +
+        "&i=" +
+        new Date() +
+        "&planId=" +
+        this.$route.params.planId;
       this.second.requestUrl =
-        "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=5" + "&i=" + new Date() + "&planId=" + this.$route.params.planId
+        "/api/v1/ams/getPlanOrder?apiId=260&orderStatus=5" +
+        "&i=" +
+        new Date() +
+        "&planId=" +
+        this.$route.params.planId;
     },
-    cancel(){
-        this.$router.go(-1)
+    cancel() {
+      this.$router.go(-1);
     },
     handleClick() {
       this.getRequirementMaterial();
-      this.getRequest()
+      this.getRequest();
     },
-    handleClose(done){
-      done()
-      this.$message.info("取消修改运力")
+    handleClose(done) {
+      done();
+      this.$message.info("取消修改运力");
     },
-    currentRadioChange1(row){
-      console.log(row)
-      this.capacityId = row.capacityId
+    currentRadioChange1(row) {
+      console.log(row);
+      this.capacityId = row.capacityId;
     },
-    getTruckRequestUrl(){
+    getTruckRequestUrl() {
       if (getCookie("orgCode") == "chengyunshang") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-        getCookie("userId") + "&test=" + new Date();
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date();
       } else {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null +  "&test=" + new Date();
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&test=" +
+          new Date();
       }
     },
     //修改运输订单
-    updatePlan(scope){
-      this.getTruckRequestUrl()
-      this.orderId = scope.row.orderId
-      this.dialogTableVisible = true
-      console.log(scope.row.orderId)
+    updatePlan(scope) {
+      this.getTruckRequestUrl();
+      this.orderId = scope.row.orderId;
+      this.dialogTableVisible = true;
+      console.log(scope.row.orderId);
     },
-    updateTruckCapacity(){
-        if(this.capacityId == null){
-            this.$message.error("未选中运力")
-            return
-        }
-        this.axios.post("/api/v1/oms/updateCapacityId",{
-          capacityId:this.capacityId,
-          orderId :this.orderId
-        }).then((res) =>{
-          if(res.data.code == "200"){
-            this.$message.success("修改运力成功")
-            this.dialogTableVisible = false
-            this.getRequest()
-            
-          }else{
-            this.$message.error("修改运力失败")
-            this.dialogTableVisible = false
-            this.getRequest()
-          }
+    updateTruckCapacity() {
+      if (this.capacityId == null) {
+        this.$message.error("未选中运力");
+        return;
+      }
+      this.axios
+        .post("/api/v1/oms/updateCapacityId", {
+          capacityId: this.capacityId,
+          orderId: this.orderId
         })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("修改运力成功");
+            this.dialogTableVisible = false;
+            this.getRequest();
+          } else {
+            this.$message.error("修改运力失败");
+            this.dialogTableVisible = false;
+            this.getRequest();
+          }
+        });
     },
-    clickTruck(){
-      this.truck.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&index=" + this.truckInput
+    clickTruck() {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        null +
+        "&index=" +
+        this.truckInput;
     },
-      //删除运输订单
-    deleteClick(scope){
-      this.$confirm('是否删除?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning',
-        }).then(() => {
-            this.axios
-            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
-            .then((res) => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "删除成功!",
-                });     
-                this.getRequest()
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning",
-                });
-              }
-            });
-        }).catch(() => {
+    //删除运输订单
+    deleteClick(scope) {
+      let map = {
+        orderId: scope.row.orderId,
+        userId: getCookie("userId")
+      };
+      this.$confirm("是否删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.axios.post("/api/v1/oms/closeOmstruckOrder", map).then(res => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "删除成功!"
+              });
+              this.getRequest();
+            } else {
+              this.$message({
+                message: "删除失败",
+                type: "warning"
+              });
+            }
+          });
+        })
+        .catch(() => {
           this.$message({
-            type: 'info',
-            message: '已取消删除'
-          });          
+            type: "info",
+            message: "已取消删除"
+          });
         });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss">

+ 11 - 5
src/views/inward/components/truckOrder/plan.vue

@@ -12,7 +12,7 @@
       <div>
         <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tab-pane label="待分解" name="second">
-            <dilTable v-bind.sync="second" ref="table1">
+            <mergeRowTable v-bind.sync="second" ref="table1">
               <el-table-column fixed="right" label="操作" width="100">
                 <template slot-scope="scope">
                   <el-button
@@ -24,10 +24,10 @@
                   </el-button>
                 </template>
               </el-table-column>
-            </dilTable>
+            </mergeRowTable>
           </el-tab-pane>
           <el-tab-pane label="已分解" name="third">
-            <dilTable v-bind.sync="third" ref="table2">
+            <mergeRowTable v-bind.sync="third" ref="table2">
               <el-table-column fixed="right" label="操作" width="180">
                 <template slot-scope="scope">
                   <el-button
@@ -76,11 +76,11 @@
                   </el-form>
                 </template>
               </el-table-column>
-            </dilTable>
+            </mergeRowTable>
           </el-tab-pane>
 
           <el-tab-pane label="已完成" name="four">
-            <dilTable v-bind.sync="four" ref="table3"> </dilTable>
+            <mergeRowTable v-bind.sync="four" ref="table3"> </mergeRowTable>
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -95,14 +95,20 @@ export default {
       inputText: "",
       carrierId: 40,
       first: {
+        columnIndexs:[0,1,2,3,4,5,9.10,21,22],
+        comparison: "requirementNumber",
         // first请求数据的地址
         requestUrl: ""
       },
       second: {
+        columnIndexs:[0,1,2,3,4,5,9.10,21,22],
+        comparison: "requirementNumber",
         // second请求数据的地址
         requestUrl: ""
       },
       third: {
+        columnIndexs:[0,1,2,3,4,5,9.10,21,22],
+        comparison: "requirementNumber",
         // second请求数据的地址
         requestUrl: ""
       },

+ 93 - 20
src/views/inward/components/truckOrder/purInwardTruckOrder.vue

@@ -6,9 +6,16 @@
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" @click="Insert" v-if="activeName == 'first'">
-        <i class="el-icon-plus"></i>新增
-      </el-button>
+      <el-badge
+        :value="addPlanCount"
+        class="item"
+        v-if="activeName == 'first'"
+        style="margin-left:10px"
+      >
+        <el-button type="primary" @click="Insert" v-if="activeName == 'first'">
+          <i class="el-icon-plus"></i>新增
+        </el-button>
+      </el-badge>
     </div>
     <el-dialog
       title="车辆信息"
@@ -133,7 +140,11 @@ export default {
       //多选的选中的订单id
       selectionList: [],
       //区别点击的是添加运力,还是修改
-      index: null
+      index: null,
+      // wssUrl: "wss:wl.dasteel.cn:32322/websocket/socketServer",
+      // actiones: { username: "湘M99999" } //传入后台的数据
+      addPlanCount: 0,
+      timer: null
     };
   },
   created() {
@@ -180,8 +191,68 @@ export default {
       this.dispatched.requestUrl =
         "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&planStatus=3";
     }
+    // this.initWebSocket();
+  },
+  mounted() {
+    this.getAddPlan();
+    this.timer = setInterval(this.getAddPlan, 10000);
+  },
+  beforeDestroy() {
+    clearInterval(this.timer);
   },
   methods: {
+    getAddPlan() {
+      this.axios
+        .post(
+          "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&enableStatus=1&planStatus=2&pageNum=1&pageSize=10"
+        )
+        .then(res => {
+          console.log("data:", res.data.data);
+          this.addPlanCount = res.data.data.total;
+        });
+    },
+    //建立websocket连接
+    initWebSocket() {
+      //试图调用websocket
+      //初始化weosocket
+      const wssUrl = this.wssUrl;
+      this.websock = new WebSocket(wssUrl);
+      this.websock.onmessage = this.websocketonmessage;
+      this.websock.onopen = this.websocketonopen;
+      this.websock.onerror = this.websocketonerror;
+      // this.websock.onclose = this.websocketclose;
+    },
+    //发送数据
+    websocketonopen() {
+      this.websocketsend();
+    },
+    //接收数据
+    websocketonmessage(e) {
+      console.log("收到信息");
+      let data = e.data;
+      console.log(data);
+      let websocketKey = data.messageContent;
+      let userName = "湘M99999";
+      let message =
+        "{'messageContent': '" +
+        websocketKey +
+        ":" +
+        userName +
+        "','messageType':1,'receivePerson': 'app','sendPerson': 'self'}";
+      this.websocketsend(message);
+    },
+    //连接建立失败重连
+    websocketonerror() {
+      this.initWebSocket();
+    },
+    //发送数据
+    websocketsend(message) {
+      this.websock.send({ message, async success() {} });
+    },
+    //关闭连接
+    websocketclose(e) {
+      console.log("断开连接", e);
+    },
     continueDispatch(scope) {
       this.$router.push("/addPurInwardOrderCon/" + scope.row.planId);
     },
@@ -255,28 +326,30 @@ export default {
     },
     //删除运输订单
     deleteClick(scope) {
+      let map = {
+        orderId: scope.row.orderId,
+        userId: getCookie("userId")
+      };
       this.$confirm("是否删除?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning"
       })
         .then(() => {
-          this.axios
-            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
-            .then(res => {
-              if (res.data.code == 200) {
-                this.$message({
-                  type: "success",
-                  message: "删除成功!"
-                });
-                this.getRequestUrl();
-              } else {
-                this.$message({
-                  message: "删除失败",
-                  type: "warning"
-                });
-              }
-            });
+          this.axios.post("/api/v1/oms/closeOmstruckOrder", map).then(res => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "删除成功!"
+              });
+              this.getRequestUrl();
+            } else {
+              this.$message({
+                message: "删除失败",
+                type: "warning"
+              });
+            }
+          });
         })
         .catch(() => {
           this.$message({

+ 64 - 5
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -114,7 +114,7 @@
             :row-key="getRowKey"
             style="width: 100%; margin-top: 20px"
             @selection-change="handleSelectionChange"
-            max-height="500px"
+            max-height="600px"
           >
             <el-table-column
               type="selection"
@@ -129,6 +129,8 @@
             </el-table-column>
             <el-table-column prop="materialName" label="物资名称">
             </el-table-column>
+            <el-table-column prop="steelMeter" label="钢材长度">
+            </el-table-column>
             <el-table-column prop="materialSpecification" label="规格型号">
             </el-table-column>
             <el-table-column prop="materialNumber" label="物资件数">
@@ -159,8 +161,15 @@
 
             <el-table-column prop="gatepostName" label="进厂门岗">
             </el-table-column>
-            <el-table-column fixed="right" label="操作" width="100">
+            <el-table-column fixed="right" label="操作" width="180">
               <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  size="mini"
+                  @click="ctrlZQueueAllow(scope)"
+                >
+                  撤销放行
+                </el-button>
                 <el-button type="text" size="mini" @click="updateBill(scope)">
                   修改提货单
                 </el-button>
@@ -184,6 +193,8 @@
             </el-table-column>
             <el-table-column prop="materialName" label="物资名称">
             </el-table-column>
+            <el-table-column prop="steelMeter" label="钢材长度">
+            </el-table-column>
             <el-table-column prop="materialSpecification" label="规格型号">
             </el-table-column>
             <el-table-column prop="materialNumber" label="物资件数">
@@ -215,8 +226,15 @@
             <el-table-column prop="sureTime" label="可进厂确认时间">
             </el-table-column>
 
-            <el-table-column fixed="right" label="操作" width="100">
+            <el-table-column fixed="right" label="操作" width="180">
               <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  size="mini"
+                  @click="ctrlZQueueAllow(scope)"
+                >
+                  撤销放行
+                </el-button>
                 <el-button type="text" size="mini" @click="updateBill(scope)">
                   修改提货单
                 </el-button>
@@ -224,6 +242,19 @@
             </el-table-column>
           </el-table>
         </el-tab-pane>
+        <el-tab-pane label="仓库排队列表" name="third">
+          <el-table
+            :data="tableData3"
+            :span-method="objectSpanMethod"
+            border
+            style="width: 100%; margin-top: 20px"
+            @selection-change="handleSelectionChange"
+            max-height="500px"
+          >
+            <el-table-column prop="warehouseName" label="仓库" fit></el-table-column>
+            <el-table-column prop="carQueue" label="排队车辆"></el-table-column>
+          </el-table>
+        </el-tab-pane>
       </el-tabs>
     </div>
   </div>
@@ -249,6 +280,7 @@ export default {
       activeName: "first",
       tableData: [],
       tableData1: [],
+      tableData3: [],
       //存放每一行记录的合并数
       spanArr: [],
       maplist: [],
@@ -298,6 +330,22 @@ export default {
     }
   },
   methods: {
+    ctrlZQueueAllow(scope) {
+      let map = {
+        listId: scope.row.listId,
+        resultTotalId: scope.row.resultTotalId
+      };
+      console.log(map);
+      this.axios.post("/api/v1/qms/ctrlZQueueAllow", map).then(res => {
+        if (res.data.code == 200) {
+          this.$message.success("撤销成功");
+          this.getNoSpellingArray();
+          this.getSpellingArray();
+        } else {
+          this.$message.error("撤单失败");
+        }
+      });
+    },
     wantEnfactory() {
       this.axios.get("/api/v1/uc/getQueueCount").then(res => {
         this.totalQueueNum = res.data.data;
@@ -433,7 +481,6 @@ export default {
         columnIndex === 0 ||
         columnIndex === 1 ||
         columnIndex === 2 ||
-        columnIndex === 7 ||
         columnIndex === 8 ||
         columnIndex === 9 ||
         columnIndex === 10 ||
@@ -457,8 +504,10 @@ export default {
       this.i = 0;
       if (this.activeName == "first") {
         this.getNoSpellingArray();
-      } else {
+      } else if(this.activeName == "second") {
         this.getSpellingArray();
+      } else {
+        this.getStoreArray();
       }
     },
     getNoSpellingArray() {
@@ -481,6 +530,16 @@ export default {
           this.getSpanArr(this.tableData);
         });
     },
+    getStoreArray() {
+      this.axios
+        .post(
+          "/api/v1/qms/getStoreQueueList"
+        )
+        .then(res => {
+          this.tableData3 = res.data.data;
+          console.log("getStoreArray "+this.tableData3);
+        });
+    },
     onclick() {
       if (this.activeName == "first") {
         this.axios

+ 70 - 0
src/views/sale/components/dilNotice/addNotice1.vue

@@ -0,0 +1,70 @@
+<template>
+  <!-- 添加公告信息 -->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+
+    <div class="form-box" style="margin-right: 10rem">
+      <dil-form :formId="389" v-model="form1" ref="from1"></dil-form>
+    </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";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form1: {},
+      value: undefined,
+    };
+  },
+  mounted() {},
+  methods: {
+    makeSure() {
+      console.log(this.form1);
+      let DilNotice = {
+        noticeTitle:this.form1.noticeTitle,
+        insertUsername:this.form1.insertUsername,
+        noticeContent:this.form1.noticeContent,
+        permissions:this.form1.permission,
+        /*这里permissions拿的是描述也就是name值*/
+      }
+      this.axios
+        .post(
+          "/api/v1/ams/insertNotice",DilNotice
+        )
+        .then((res) => {
+          this.$router.go(-1);
+        });
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.form-box,
+.from {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-top: 5px;
+  margin-bottom: 20px;
+}
+.button-box{
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 0.3125rem;
+  margin-bottom: 1.25rem;
+}
+</style>

+ 71 - 0
src/views/sale/components/dilNotice/addNotice2.vue

@@ -0,0 +1,71 @@
+<template>
+  <!-- 添加公告信息 -->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+
+    <div class="form-box" style="margin-right: 10rem">
+      <dil-form :formId="390" v-model="form1" ref="from1"></dil-form>
+    </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";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form1: {},
+      value: undefined,
+    };
+  },
+  mounted() {},
+  methods: {
+    makeSure() {
+      console.log(this.form1);
+      let DilNotice = {
+        noticeTitle:this.form1.noticeTitle,
+        insertUsername:this.form1.insertUsername,
+        noticeContent:this.form1.noticeContent,
+        permissions:this.form1.permission,
+        /*这里permissions拿的是描述也就是name值*/
+      }
+      this.axios
+        .post(
+          "/api/v1/ams/insertNotice",DilNotice
+        )
+        .then((res) => {
+          this.$router.go(-1);
+        });
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.form-box,
+.from {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-top: 5px;
+  margin-bottom: 20px;
+}
+.button-box{
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 0.3125rem;
+  margin-bottom: 1.25rem;
+}
+</style>
+

+ 1 - 1
src/views/sale/components/dilNotice/clientNotice.vue

@@ -77,7 +77,7 @@ export default {
     },
     /*新增通知*/
     toInsert() {
-      this.$router.push("/addNotice");
+      this.$router.push("/addNotice2");
 
     },
 

+ 1 - 1
src/views/sale/components/dilNotice/marketingNotice.vue

@@ -78,7 +78,7 @@ export default {
     },
     /*新增通知*/
     toInsert() {
-      this.$router.push("/addNotice");
+      this.$router.push("/addNotice1");
 
     },
 

+ 84 - 6
src/views/sale/components/offSiteTransportation/checkGPS.vue

@@ -58,6 +58,19 @@
           >查询</el-button
         >
       </div>
+      <div class="in_transit_information2">
+        <span class="item_details">查询地址:</span>
+        <el-input
+          style="width: 300px;"
+          class="inputStyle"
+          v-model.trim="address"
+          clearable
+        >
+        </el-input>
+         <el-button type="primary" class="searchstyle" @click="initLocation"
+          >查询</el-button
+        >
+      </div>
       <div class="driving_information">
         <span class="item_details2">时间:{{ runRoute.gtm }}</span>
         <br />
@@ -178,6 +191,7 @@ export default {
   },
   data() {
     return {
+      address:null,
       //一、 查询相关
       //选择时间区间
       time: [],
@@ -476,12 +490,38 @@ export default {
         }
       });
     },
+    //查询地址并画点
+    initLocation(){
+      console.log("address:",this.address);
+      if(this.address && this.address!=""){
+        this.axios.get("/api/v1/otms/getLocationForAddress?address="+this.address).then((res)=>{
+        console.log("res:",res);
+        if(res.data.code=="0"){
+          //画点
+          this.initMap2([res.data.data.lon,res.data.data.lat],res.data.data.title,res.data.data.address);
+        }else{
+          this.$message({
+            message:res.data.data,
+            type:"warning",
+            offset:100,
+            showClose:true
+          });
+        }
+      });
+      }
+      
+    },
     //初始化数据
     initData() {
       let that = this;
       that.listPath = [];
       if (that.carNumber == "") {
-        this.$message.error("车牌号不能为空!");
+        this.$message({
+          message:"车牌号不能为空!",
+          offset:100,
+          type:"warning",
+          showClose:true
+        });
         return;
       }
       if (that.time == null && that.time.length != 2) {
@@ -508,11 +548,17 @@ export default {
         .then(res => {
           if (res.data.data == "-1") {
             this.$message.error("运输订单未关闭,自提车辆无权查看!");
-          } else if (res.data.data.startAndEndRoutes != "") {
+          } else if (res.data.data.startAndEndRoutes) {
+            console.log("res.data.data:",res.data.data);
             that.listPath = res.data.data.startAndEndRoutes;
             that.initMap([105.602725, 37.076636]);
           } else {
-            this.$message.error("车辆没有开启GPS");
+            this.$message({
+              message:"车辆没有开启GPS或尚未注册!",
+              offset:100,
+              type:"warning",
+              showClose:true
+            });
           }
         });
     },
@@ -534,9 +580,40 @@ export default {
         that.initThreeMarker();
         //初始化当前点标记
         //that.initCustomMarkes(that.carNumber+"("+that.listPath[0].miled+")",that.listPath[0].currentPointName,that.listPath[0].currentPoint.lon,that.listPath[0].currentPoint.lat)
-        //that.initEndline();
+        that.initEndline();
       });
     },
+    initMap2(lonlat,title,address){
+      lazyAMapApiLoaderInstance.load().then(() => {
+        let that = this;
+        if(!that.map){
+           that.map = new AMap.Map("amap-container", {
+            //设置地图容器id
+            viewMode: "2D", //是否为2D地图模式
+            zoom: 10, //初始化地图级别
+            center: lonlat //初始化地图中心点位置
+          });
+          //初始化
+          that.initGeocoder();
+        }
+        that.initMarkes( 20,25, require("@/assets/img/end.png"),lonlat[0],lonlat[1],title);
+        //自定义窗体内容
+        let content = [
+          "<div  style='top:1px;width: 200px; background-color:  rgba(22, 160, 133, 1);' ><font color='white'>位置:"+
+          address
+          +"</font>",
+          "<div style='background-color:rgba(22, 160, 133, 1);'><font color='white'>名称:" +
+            title +
+            "</font></div></div>"
+        ];
+        // 创建 infoWindow 实例
+        infoWindow = new AMap.InfoWindow({
+          content: content.join("<br>") //传入 dom 对象,或者 html 字符串
+        });
+        // 打开信息窗体
+        infoWindow.open(that.map, lonlat);
+        });
+    },
     //结束点
     initEndline() {
       let that = this;
@@ -569,11 +646,11 @@ export default {
           element.endPoint != "" &&
           element.endPoint != null
         ) {
-          // that.initMarkes(20,35,require('@/assets/img/end.png'),element.endPoint.lon,element.endPoint.lat,'终点');
+          that.initMarkes(20,35,require('@/assets/img/end.png'),element.endPoint.lon,element.endPoint.lat,'终点');
           //终点名称
           that.getEndPointName([element.endPoint.lon, element.endPoint.lat]);
         } else {
-          // that.initMarkes(20,35,require('@/assets/img/end.png'),element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat,'终点');
+          that.initMarkes(20,35,require('@/assets/img/end.png'),element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat,'终点');
           //终点名称
           that.getEndPointName([
             element.runRoute[element.runRoute.length - 1].lon,
@@ -604,6 +681,7 @@ export default {
     //初始化预计轨迹
     initPolyline(path, color) {
       let that = this;
+      console.log("path:",path);
       //预计轨迹
       var endLine = new AMap.Polyline({
         map: that.map, //地图组件

+ 177 - 169
src/views/sale/components/saleSelfMachine/printReceipt.vue

@@ -1,149 +1,157 @@
 <template>
   <div class="tableAllDate">
-    <div id="pdfDom">
-      <div class="blank"></div>
-      <div class="title">
-        <h1 align="center">{{ shippername }}</h1>
-        <h1 align="center">物资送货单</h1>
-      </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%">{{ saleNo }}</td>
-          </tr>
-        </table>
-      </div>
-      <div class="tableBody">
-        <!-- tablePart1 -->
-        <table
-          border="1"
-          cellpadding="10"
-          cellspacing="0"
-          style="margin-top: 10px; text-align: center"
-          width="1000px"
-          class="tablePart1"
-        >
-          <tr>
-            <th style="width: 5%; text-align: center">序号</th>
-            <th style="width: 21.5%; text-align: center">物资名称</th>
-            <th style="width: 21.5%; text-align: center">规格型号</th>
-            <th style="width: 14%">件数</th>
-            <th style="width: 14%">重量</th>
-            <th style="width: 19%">订单日期</th>
-          </tr>
-
-          <tr v-for="(item, index) in deliveryOrderMaterialList" :key="index">
-            <td>{{ index + 1 }}</td>
-            <td>{{ item.materialName }}</td>
-            <td>{{ item.materialSpe }}{{ item.materialModel }}</td>
-            <td>{{ item.materialNumber }}</td>
-            <td>{{ item.materialWeight }}</td>
-            <td>{{ item.makeDate }}</td>
-          </tr>
-        </table>
-
-        <!-- tablePart2 -->
-        <table
-          border="1"
-          cellpadding="10"
-          cellspacing="0"
-          style="border-top: 0px"
-          width="1000px"
-          class="tablePart2"
-        >
-          <tr>
-            <th style="width: 19.25%">收货地点</th>
-            <td style="width: 50%">
-              {{ province }}{{ district }}{{ town }}{{ deliveryAddress }}
-            </td>
-          </tr>
-        </table>
-
-        <!-- tablePart3 -->
-        <table
-          border="1"
-          cellpadding="10"
-          cellspacing="0"
-          style="border-top: 0px"
-          width="1000px"
-          class="tablePart3"
-        >
-          <tr>
-            <th style="width: 21.65%">收货人</th>
-            <td style="width: 20%">{{ consignee }}</td>
-            <th style="width: 10.5%">电话</th>
-            <td style="width: 26%">{{ consigneeTel }}</td>
-          </tr>
-        </table>
-
+    <div class="button-box">
+      <el-button
+        type="primary"
+        v-print="'#pdfDom1'"
+        @click="backScan()"
+        style="width: 500px;height: 120px;font-size: 100px"
+      >
+        <!--class="el-icon-printer"-->
+        <!---->
+        打印
+      </el-button>
+    </div>
+    <div id="pdfDom1">
+      <div id="pdfDom" v-for="(item, index) in dataList" :key="index">
+        <div class="blank"></div>
 
-     
+        <div class="title">
+          <h5 align="center">{{ shippername }} 物资送货单</h5>
+          <!--        <h5 align="center">物资送货单</h5>-->
+        </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%">{{ saleNo }}</td>
+            </tr>
+          </table>
+        </div>
+        <div class="tableBody">
+          <!-- tablePart1 -->
+          <table
+            border="1"
+            cellpadding="10"
+            cellspacing="0"
+            style="margin-top: 10px; text-align: center"
+            width="1000px"
+            class="tablePart1"
+          >
+            <tr>
+              <th style="width: 5%; text-align: center">序号</th>
+              <th style="width: 23.5%; text-align: center">物资名称</th>
+              <th style="width: 22.5%; text-align: center">规格型号</th>
+              <th style="width: 14%">件数</th>
+              <th style="width: 14%">重量</th>
+              <th style="width: 21%">订单日期</th>
+            </tr>
+            <tr v-for="(item, index) in deliveryOrderMaterialList" :key="index">
+              <td>{{ index + 1 }}</td>
+              <td>{{ item.materialName }}</td>
+              <td>{{ item.materialSpe }}{{ item.materialModel }}</td>
+              <td>{{ item.materialNumber }}</td>
+              <td>{{ item.materialWeight }}</td>
+              <td>{{ item.makeDate }}</td>
+            </tr>
+          </table>
 
-        <!-- tablePart4 -->
-        <table
-          border="0"
-          cellpadding="10"
-          cellspacing="0"
-          style="border-top: 0px"
-          width="1000px"
-          class="tablePart4"
-        >
-          <tr>
-            <th style="width: 27.75%">承运商</th>
-            <td style="width: 36.5%">{{ carrierName }}</td>
-            <th style="width: 13%">车牌号</th>
-            <td style="width: 40%">{{ capacityNumber }}</td>
-          </tr>
-        </table>
+          <!-- tablePart2 -->
+          <table
+            border="1"
+            cellpadding="10"
+            cellspacing="0"
+            style="border-top: 0px"
+            width="1000px"
+            class="tablePart2"
+          >
+            <tr>
+              <th style="width: 28.5%">收货地点</th>
+              <td style="width: 71.5%">
+                {{ province }}{{ district }}{{ town }}{{ deliveryAddress }}
+              </td>
+            </tr>
+          </table>
 
+          <!-- tablePart3 -->
+          <table
+            border="1"
+            cellpadding="10"
+            cellspacing="0"
+            style="border-top: 0px"
+            width="1000px"
+            class="tablePart3"
+          >
+            <tr>
+              <th style="width: 28.5%">收货人</th>
+              <td style="width: 22.5%">{{ consignee }}</td>
+              <th style="width: 14%">电话</th>
+              <td style="width: 35%">{{ consigneeTel }}</td>
+            </tr>
+          </table>
 
-              <!-- tablePart9 -->
-        <table
-          border="1"
-          cellpadding="10"
-          cellspacing="0"
-          style="border-top: 0px"
-          width="1000px"
-          class="tablePart9"
-        >
-          <tr>
-            <th style="width: 7.62%">备注</th>
-            <td style="width: 20%"></td>
-           
-          </tr>
-        </table>
-      </div>
+          <!-- tablePart4 -->
+          <table
+            border="0"
+            cellpadding="10"
+            cellspacing="0"
+            style="border-top: 0px"
+            width="1000px"
+            class="tablePart4"
+          >
+            <tr>
+              <th style="width: 28.5%">承运商</th>
+              <td style="width: 36.5%">{{ carrierName }}</td>
+              <th style="width: 14%">车牌号</th>
+              <td style="width: 35%">{{ capacityNumber }}</td>
+            </tr>
+          </table>
 
-     
+          <!-- tablePart9 -->
+          <table
+            border="1"
+            cellpadding="10"
+            cellspacing="0"
+            style="border-top: 0px"
+            width="1000px"
+            class="tablePart9"
+          >
+            <tr>
+              <th style="width: 28.5%">备注</th>
+              <td style="width: 71.5%">{{ note }}</td>
+            </tr>
+          </table>
+        </div>
 
-      <div>
-        <!-- tablePart6 -->
-        <table
-          border="0"
-          cellpadding="10"
-          cellspacing="0"
-          style="margin: auto; font-size: 20px; margin-top: 10px"
-          width="1000px"
-          class="tablePart6"
-        >
-          <tr>
-            <th style="width: 6.25%">发货单位:</th>
-            <td style="width: 53.5%">{{ shippername }}</td>
-          </tr>
-        </table>
-</div>
+        <div>
+          <!-- tablePart6 margin-top: 10px-->
+          <table
+            border="0"
+            cellpadding="10"
+            cellspacing="0"
+            style="margin: auto; font-size: 20px"
+            width="1000px"
+            class="tablePart6"
+          >
+            <tr>
+              <th style="width: 8.25%">发货单位:</th>
+              <td style="width: 30.5%">{{ shippername }}</td>
+              <th style="width: 8.25%">收货单位:</th>
+              <td style="width: 30.5%">{{ consigeeName }}</td>
+            </tr>
+          </table>
+        </div>
 
-          <div>
-        <!-- tablePart6 -->
+        <!--          <div>
+        &lt;!&ndash; tablePart6 &ndash;&gt;
         <table
           border="0"
           cellpadding="10"
@@ -157,24 +165,25 @@
             <td style="width: 53.5%">{{ consigeeName }}</td>
           </tr>
         </table>
-      </div>
-      <div>
-        <!-- tablePart6 -->
-        <table
-          border="0"
-          cellpadding="10"
-          cellspacing="0"
-          style="margin: auto; font-size: 20px; margin-top: 10px"
-          width="1000px"
-          class="tablePart6"
-        >
-          <tr>
-            <th style="width: 14.5%">签收人:</th>
-          </tr>
-        </table>
-      </div>
-      <div>
-        <!-- tablePart6 -->
+      </div>-->
+        <div>
+          <!-- tablePart6 margin-top: 10px-->
+          <table
+            border="0"
+            cellpadding="10"
+            cellspacing="0"
+            style="margin: auto; font-size: 20px"
+            width="1000px"
+            class="tablePart6"
+          >
+            <tr>
+              <th style="width: 14.5%">签收人:</th>
+              <th style="width: 14.5%">签收时间:</th>
+            </tr>
+          </table>
+        </div>
+        <!--      <div>
+        &lt;!&ndash; tablePart6 &ndash;&gt;
         <table
           border="0"
           cellpadding="10"
@@ -187,19 +196,15 @@
             <th style="width: 14.5%">签收时间:</th>
           </tr>
         </table>
+      </div>-->
       </div>
     </div>
     <!-- <el-button style="margin-left: 45%;" type="primary" @click="getPdf()">
         <i class="el-icon-download"></i>导出(pdf)
       </el-button> -->
-    <div class="button-box">
-      <el-button type="primary" v-print="'#pdfDom'" @click="backScan()">
-        <i class="el-icon-printer"></i>打印
-      </el-button>
-      <el-button type="primary" @click="backScan()">
-        <i class="el-icon-back"></i>返回
-      </el-button>
-    </div>
+    <el-button type="primary" @click="backScan()">
+      <i class="el-icon-back"></i>返回
+    </el-button>
   </div>
 </template>
 
@@ -225,8 +230,8 @@ export default {
           materialModel: "",
           materialNumber: 0,
           materialWeight: 0,
-          makeDate: "",
-        },
+          makeDate: ""
+        }
       ],
       carrierName: "",
       province: "",
@@ -238,6 +243,8 @@ export default {
       month: new Date().getMonth() + 1,
       date: new Date().getDate(),
       htmlTitle: "客户换票送货单",
+      note: "",
+      dataList: ["1", "2", "3"]
     };
   },
   created() {
@@ -257,7 +264,7 @@ export default {
       let orderNumber = this.$route.query.orderNumber;
       this.axios
         .post("/api/v1/tms/getDeliveryOrder?orderNumber=" + orderNumber)
-        .then((res) => {
+        .then(res => {
           console.log(res);
           this.orderNumber = res.data.orderNumber;
           this.carrierName = res.data.carrierName;
@@ -274,12 +281,13 @@ export default {
           this.town = res.data.town;
           this.deliveryAddress = res.data.deliveryAddress;
           this.deliveryOrderMaterialList = res.data.deliveryOrderMaterialList;
+          this.note = res.data.note;
         });
     },
     backScan() {
-      this.$router.go(-2);
-    },
-  },
+      this.$router.go(-1);
+    }
+  }
 };
 </script>
 

+ 100 - 90
src/views/sale/components/saleSelfMachine/printScan.vue

@@ -1,97 +1,107 @@
 <template>
-    <div class="saleSelfMachine">
-        <div class="background">
-            <img :src="backgroundImgURL" width="100%" height="100%"/>
-        </div>
-        <div class="orderNumberData">
-            <el-input placeholder="请将二维码放置在扫描区" v-model="orderNumber" :focus="true" ref="inputs" :disabled="!isEdit">
-            </el-input>
-            <div style="display:block;width:120px">
-                手动输入开关:
-            </div>
-            <el-switch
-            v-model="isEdit"
-            active-color="#66ccff"
-            inactive-color="#ffffff">
-            </el-switch>
-        </div>
-    </div>    
+  <div class="saleSelfMachine">
+    <div class="background">
+      <img :src="backgroundImgURL" width="100%" height="100%" />
+    </div>
+    <div class="orderNumberData">
+      <el-input
+        placeholder="请将二维码放置在扫描区"
+        v-model="orderNumber"
+        :focus="true"
+        ref="inputs"
+        :disabled="!isEdit"
+      >
+      </el-input>
+      <div style="display:block;width:120px">
+        手动输入开关:
+      </div>
+      <el-switch
+        v-model="isEdit"
+        active-color="#66ccff"
+        inactive-color="#ffffff"
+      >
+      </el-switch>
+    </div>
+  </div>
 </template>
 <script>
 export default {
-    data(){
-        return{
-            orderNumber:null,
-            isEdit:false,
-            backgroundImgURL:require('@/assets/saleSelfMachine/scanCode.jpg'),
-        }
-    },
-    created(){
-        this.changfouce();
-    },
-    // watch:{
-    //    data:"toSaleSelfMachine"
-    // },
-    methods:{
-        //输入框自动聚焦
-        changfouce(){
-        this.$nextTick((x)=>{
+  data() {
+    return {
+      orderNumber: null,
+      isEdit: true,
+      backgroundImgURL: require("@/assets/saleSelfMachine/scanCode.jpg")
+    };
+  },
+  created() {
+    this.changfouce();
+  },
+  // watch:{
+  //    data:"toSaleSelfMachine"
+  // },
+  methods: {
+    //输入框自动聚焦
+    changfouce() {
+      this.$nextTick(x => {
         this.$refs.inputs.focus();
-        })
-        },
-        //失去焦点后自动执行获得焦点事件
-        // onInputBlur(){
-        //     console.log("获取焦点")
-        //     this.changfouce();
-        // }
-        // toSaleSelfMachine(){
-        //      this.$router.push({
-        //         path:'/saleSelfMachine',
-        //     })
-        // }
-    },
-    mounted(){
-        // this.changfouce();
-    const timer = setInterval(()=>{
-        // if(this.$refs.inputs.focus==false){
-        //     console.log("false")
-            this.changfouce();
-        //}
-         if(this.orderNumber!=null&&this.orderNumber.length==21){
-            if(this.orderNumber.startsWith('WYSDD')==true||this.orderNumber.startsWith('wysdd')==true){
-                this.$router.push({
-                        path:"/saleSelfMachine?orderNumber="+this.orderNumber,
-                })
-            }
-        }else if(this.orderNumber.length>21){
-            //清空输入框,免得一次多个重复订单还无法删除
-            this.orderNumber=null;
-        } 
-    },3000)
-    this.$once('hook:beforeDestroy', ()=>{
-        clearInterval(timer)
-    })
-} 
-}
+      });
+    }
+    //失去焦点后自动执行获得焦点事件
+    // onInputBlur(){
+    //     console.log("获取焦点")
+    //     this.changfouce();
+    // }
+    // toSaleSelfMachine(){
+    //      this.$router.push({
+    //         path:'/saleSelfMachine',
+    //     })
+    // }
+  },
+  mounted() {
+    // this.changfouce();
+    const timer = setInterval(() => {
+      // if(this.$refs.inputs.focus==false){
+      //     console.log("false")
+      this.changfouce();
+      //}
+      if (this.orderNumber != null && this.orderNumber.length == 21) {
+        if (
+          this.orderNumber.startsWith("WYSDD") == true ||
+          this.orderNumber.startsWith("wysdd") == true
+        ) {
+          this.$router.push({
+            path: "/printReceipt?orderNumber=" + this.orderNumber
+          });
+        }
+      } else if (this.orderNumber.length > 21) {
+        //清空输入框,免得一次多个重复订单还无法删除
+        this.orderNumber = null;
+      }
+    }, 3000);
+    this.$once("hook:beforeDestroy", () => {
+      clearInterval(timer);
+    });
+  }
+};
 </script>
 <style lang="scss">
-    .saleSelfMachine{
-        width: 100vh;
-        height: 100vh;
-        .background {
-            width: 100%;
-            height: 100%; 
-            z-index: -1;
-            position: absolute;
-            overflow: hidden;
-        }
-        .orderNumberData{
-            width: 100%;
-            color: #fff;
-            position: absolute;
-            display: flex;
-            justify-content: center;
-            align-items: center;
-        }
-    }
-</style>
+.saleSelfMachine {
+  width: 100vh;
+  height: 100vh;
+  .background {
+    width: 100%;
+    height: 100%;
+    z-index: -1;
+    position: absolute;
+    overflow: hidden;
+  }
+  .orderNumberData {
+    width: 100%;
+    color: #fff;
+    position: absolute;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+}
+</style>

+ 41 - 15
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelDetails.vue

@@ -40,10 +40,6 @@
                   @click="priceValueUpdate(scope.row)"
                   >修改详单地址</el-button
                 >
-                <!-- <el-button type="text" size="mini" @click="getclick(scope)">查看</el-button> -->
-                <el-button type="text" size="mini" @click="addDamage(scope.row)"
-                  >增加途损</el-button
-                >
               </template>
             </el-table-column>
           </dilTable>
@@ -67,7 +63,7 @@
       append-to-body
     >
       <!-- 内层单价选择弹出框 -->
-      <el-dialog
+<!--      <el-dialog
         width="40%"
         title="地址筛选"
         :visible.sync="addressDrawer"
@@ -84,7 +80,7 @@
           :loading="selectLineLoading"
           ><i class="el-icon-search"></i>查询</el-button
         >
-        <!-- 已选中 省市(区)县 -->
+        &lt;!&ndash; 已选中 省市(区)县 &ndash;&gt;
         <el-form :inline="true" style="margin-top: 0.5rem;">
           <el-form-item>
             <label class="el-form-item__label" style="width: auto;"
@@ -100,7 +96,7 @@
             ></el-input>
           </el-form-item>
         </el-form>
-        <!-- 具体收货地址 -->
+        &lt;!&ndash; 具体收货地址 &ndash;&gt;
         <div v-if="address != null">
           <el-form :inline="true" style="margin-top: 0.5rem;">
             <el-form-item label="具体收货地址:">
@@ -120,13 +116,13 @@
         </div>
 
         <div class="tablecls">
-          <!-- 查询所有的运输单价 -->
+          &lt;!&ndash; 查询所有的运输单价 &ndash;&gt;
           <dilTable
             v-bind.sync="Address"
             @radio-change="currentRadioChange2"
           ></dilTable>
         </div>
-      </el-dialog>
+      </el-dialog>-->
       <!-- 内层单价选择弹出框 -->
 
       <el-form>
@@ -143,7 +139,26 @@
             disabled
           ></el-input>
         </el-form-item>
-        <el-form-item label="新详单地址" :label-width="formLabelWidth">
+        <el-input
+          v-model="addresText"
+          placeholder="请输入内容"
+          style="margin-top: 10px; margin-left: 20px; width: 250px"
+          @keyup.native.enter="selectAddresClick"
+        ></el-input>
+        <el-button
+          type="primary"
+          @click="selectAddresClick"
+          :loading="selectLineLoading"
+        ><i class="el-icon-search"></i>查询</el-button
+        >
+        <div class="tablecls">
+          <!-- 查询所有的运输单价 -->
+          <dilTable
+            v-bind.sync="Address"
+            @radio-change="currentRadioChange2"
+          ></dilTable>
+        </div>
+<!--        <el-form-item label="新详单地址" :label-width="formLabelWidth">
           <el-input
             style="width:250px"
             v-model="newAddress"
@@ -158,7 +173,7 @@
           <el-button type="primary" placeholder="()" @click="select"
             >浏览</el-button
           >
-        </el-form-item>
+        </el-form-item>-->
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取 消</el-button>
@@ -244,7 +259,7 @@ export default {
       addressDrawer: false,
       //运输单价的表格
       Address: {
-        requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
+        requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=511",
         selectionType: "radio"
       },
       // addressText:null,
@@ -291,11 +306,11 @@ export default {
     selectAddresClick() {
       if (this.addresText) {
         this.Address.requestUrl =
-          "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
+          "/api/v1/ams/getAddressDeliveryAddress?apiId=511&con=" +
           this.addresText;
       } else {
         this.Address.requestUrl =
-          "/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=" + new Date();
+          "/api/v1/ams/getAddressDeliveryAddress?apiId=511&i=" + new Date();
       }
     },
     //以下是收货地址边输边查搜索
@@ -390,6 +405,7 @@ export default {
       }
     },
     onclick() {
+
       console.log("查询待定值");
       let startTime = null;
       let endTime = null;
@@ -462,11 +478,14 @@ export default {
     },
     //运输单价模态框单选选中的事件
     currentRadioChange2(val) {
+      console.log(val);
       //若具体地址有值,清空值
       if (this.place != null) {
         this.place = null;
       }
       (this.address = val.address), (this.addressId = val.addressId);
+
+      this.priceId=val.priceid
       // this.priceMap = {};
       // this.priceMap = val;
     },
@@ -503,7 +522,14 @@ export default {
                     this.$message.success("修改详单单价成功!");
                     //重置未结算详单表单信息
                     this.options1.requestUrl =
-                      "/api/v1/bms/getUnFinishedTruckDetailsOrderList?apiId=176&orderType=1&i=" +
+                      "/api/v1/bms/getSteelTruckDetailsOrder?apiId=507&orderType=1&con=" +
+                      this.input +
+                      "&startTime=" +
+                      startTime +
+                      "&endTime=" +
+                      endTime +
+                      "&status=0" +
+                      "&i=" +
                       new Date();
                   } else {
                     this.$message.error("修改详单单价失败,请联系管理员!");

+ 14 - 0
src/views/sale/router/index.js

@@ -48,6 +48,8 @@ import add_sale_dilNotice from "../components/dilNotice/add_sale_dilNotice.vue";
 import Carrier_dilNotice from "../components/dilNotice/Carrier_dilNotice.vue";
 import sale_dilNotice from "../components/dilNotice/sale_dilNotice.vue";
 import addNotice from "../components/dilNotice/addNotice.vue";
+import addNotice1 from "../components/dilNotice/addNotice1.vue";
+import addNotice2 from "../components/dilNotice/addNotice2.vue";
 import carrierNotice from "../components/dilNotice/carrierNotice.vue";
 import clientNotice from "../components/dilNotice/clientNotice.vue";
 import editNotice from "../components/dilNotice/editNotice.vue";
@@ -374,6 +376,18 @@ const constantRouterMap = [
         meta: { code: "xtpzgl-yhgl" },
         component: addNotice
       },
+      {
+        path: "addNotice1",
+        name: "addNotice1",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addNotice1
+      },
+      {
+        path: "addNotice2",
+        name: "addNotice2",
+        meta: { code: "xtpzgl-yhgl" },
+        component: addNotice2
+      },
       {
         path: "carrierNotice",
         name: "carrierNotice",

+ 205 - 0
src/views/statisticalReport/components/ShipWorkReport.vue

@@ -0,0 +1,205 @@
+<template>
+  <!-- 万州港作业报表 -->
+  <div class="ShipWorkReport">
+    <div style="height:100%;width:100%">
+      <div class="search" style="display:flex;margin: 10px;">
+        <el-input
+          placeholder="请输入"
+          v-model="map.input"
+          style="margin: 10px; width:10%"
+          clearable
+        ></el-input>
+       <el-date-picker style="margin: 10px;" v-model="map.startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;" v-model="map.endTime" type="datetime" placeholder="结束日期"></el-date-picker>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="searchLoadData"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+      </div>
+      <!-- 装车出库详情 -->
+      <div class="loadData" style="height:500px;float:left;margin-left:5px">
+        <div style="font-size:16px;color:red">港口装车数据:共{{count}}车</div>
+        <div class="loadTable" style="height:500px;overflow:scroll;">
+             <el-table
+          ref="loadTable"
+          highlight-current-row
+          border
+          :data="loadTable"
+          :span-method="objectSpanMethod"
+          :row-style="{height:'40px'}"
+          style="width: 100%;font-size: 18px">
+          <el-table-column
+          align="center"
+            prop="materialName"
+            label="物资名"
+            width="300px">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="resultForeignShipName"
+            label="船号"
+            width="150px">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="num"
+            label="装车量"
+            width="150px">
+          </el-table-column>
+        </el-table>
+        </div >
+      </div>
+      <!-- 卸船作业 -->
+      <div class="right" style="margin-right=10px:10px;float:right;">
+        <div style="font-size:16px;color:red">港口卸船数据</div>
+           <el-table
+          ref="unLoadTable"
+          highlight-current-row
+          border
+          :data="unLoadTable"
+          :row-style="{height:'40px'}"
+          style="width: 100%;font-size: 18px">
+          <el-table-column
+          type="index"
+          width="50"
+          label="编号"
+          align="center"
+          fixed="left"
+          :resizable="false">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="status"
+            label="状态"
+            width="240px">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="num"
+            label="数量"
+            width="100px">
+          </el-table-column>
+        </el-table>
+    </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import {getCookie} from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+        count:0,
+        loadTable:[],
+        unLoadTable:[],
+        map:{
+            input:"",
+            startTime:null,
+            endTime:null
+        },
+        spanArr: [], // 用于存放需要合并的行的个数
+        spanIndex: 0, // 记录spanArr数组的下标
+      
+    };
+  },
+  mounted(){
+    this.searchLoadData();
+    this.searchUnLoadData();
+  },
+  methods: {
+    //查询装车数据
+    searchLoadData(){
+      //时间校验
+      if(this.map.startTime && this.map.endTime){
+        if(this.map.startTime>=this.map.endTime){
+            this.$message({
+                message:"结束日期必须大于起始日期!",
+                type:"warning",
+                duration:2000
+            });
+            return;
+        }
+        this.map.startTime=sjTime(this.map.startTime);
+        this.map.endTime=sjTime(this.map.endTime);
+      }else if((this.map.startTime && !this.map.endTime) || (!this.map.startTime && this.map.endTime)){
+        this.$message({
+            message:"起止日期错误!",
+            type:"warning",
+            duration:2000
+        });
+        return;
+      }
+      this.axios.post('/api/v1/tms/getLoadData',this.map).then((res)=>{
+        if(res.data.code == "200"){
+          this.getSpanArr(res.data.data);
+          this.loadTable=res.data.data;
+          this.count=0;
+          this.loadTable.forEach((item)=>{
+            this.count+=item.num;
+          });
+        }else {
+          this.$message({
+              type: "error", 
+              message: res.data.data,
+          });
+        }
+      })
+    },
+    //查询卸船
+    searchUnLoadData(){
+      this.axios.post('/api/v1/tms/getUnloadData').then((res)=>{
+        if(res.data.code == "200"){
+          this.unLoadTable=res.data.data;
+        }else {
+          this.$message({
+              type: "error", 
+              message: res.data.data,
+          });
+        }
+      })
+    },
+    //处理数据,得到合并数组
+    getSpanArr(data) {
+        this.spanArr=[];
+        for (let i = 0; i < data.length; i++) {
+            if (i == 0) {
+                this.spanArr.push(1);
+                this.spanIndex = 0;
+            } else {
+                // 判断当前行与前一行内容是否相同
+                if (data[i].materialName == data[i - 1].materialName) {
+                    this.spanArr[this.spanIndex] += 1; // 相同的话,当前下标所代表的值加一,例如:第一列的前三行可合并
+                    this.spanArr.push(0);// 记录完毕后,再往数组里添加一个元素0,作为下一次合并的初始值
+                } else {
+                    this.spanArr.push(1); // 否则,依旧是一行
+                    this.spanIndex = i;
+                }
+            }
+        }
+    },
+     //合并
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+        if (columnIndex === 0) {
+            const _row = this.spanArr[rowIndex]; // 行数
+            const _col = _row > 0 ? 1 : 0; // 列数
+            return {
+                rowspan: _row,
+                colspan: _col
+            };
+        }
+    },
+  },
+};
+</script>
+<style lang='scss'>
+
+</style>
+

+ 112 - 107
src/views/statisticalReport/components/Ship_dynamic_table.vue

@@ -18,27 +18,6 @@
         </el-button>
       </div>
       <table-item :tableData="tableData" :col="col" id="pdfDom"> </table-item>
-      <table
-        border="0"
-        cellpadding="10"
-        cellspacing="0"
-        style="
-          margin: auto;
-          font-size: 21px;
-          font-family: FangSong;
-          line-height: 50px;
-        "
-
-        width="100%"
-        class="tablePart0"
-      >
-        <tr>
-          <!-- <td>{{stockString}}</td> -->
-          <td>
-            <span v-for="item in stockStringArr" :class="item.class" :key="item.value">{{item.value}}</span>
-          </td>
-        </tr>
-      </table>
     </div>
   </div>
 </template>
@@ -47,7 +26,7 @@ import tableItem from "./tableItem";
 export default {
   name: "TableView",
   components: {
-    tableItem,
+    tableItem
   },
   data() {
     return {
@@ -56,120 +35,120 @@ export default {
       col: [
         {
           prop: "materialType",
-          label: "矿种",
+          label: "矿种"
         },
         {
           prop: "pm",
-          label: "品名",
+          label: "品名"
         },
         {
           prop: "portName",
-          label: "港口名称",
+          label: "港口名称"
         },
         {
           prop: "tonnage",
-          label: "下游港口吨位",
+          label: "下游港口吨位"
         },
         {
           prop: "tonnage1",
-          label: "二层船吨位",
+          label: "二层船吨位"
         },
         {
           label: "未到闸船舶",
           children: [
             {
               prop: "capacity1",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber1",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue1",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime1",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "等闸船舶",
           children: [
             {
               prop: "capacity2",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber2",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue2",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime2",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "已过闸船舶",
           children: [
             {
               prop: "capacity3",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber3",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue3",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime3",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "到港待卸船舶",
           children: [
             {
               prop: "capacity4",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber4",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue4",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime4",
-              label: "离港时间",
+              label: "离港时间"
             },
             {
               prop: "dgsj",
-              label: "到港时间",
-            },
-          ],
-        },
+              label: "到港时间"
+            }
+          ]
+        }
       ],
       // 表格数据
 
       tableData: [],
       input: "",
       //万州港库存信息
-      stockString:null,
-      stockStringArr:[]
+      stockString: null,
+      stockStringArr: []
     };
   },
   created() {},
@@ -182,7 +161,7 @@ export default {
     onclick() {
       this.axios
         .post("/api/v1/tms/selectAllShipDynamaics?con=" + this.input)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             this.tableData = res.data.data;
             console.log("aaad" + res.data.data);
@@ -192,70 +171,96 @@ export default {
         });
     },
     initialization() {
-      this.axios.post("/api/v1/tms/selectAllShipDynamaics").then((res) => {
+      this.axios.post("/api/v1/tms/selectAllShipDynamaics").then(res => {
         if (res.data.code == "200") {
           this.tableData = res.data.data;
           console.log(this.tableData);
         } else {
           this.$message({
             type: "warning",
-            message: res.data.data,
+            message: res.data.data
           });
         }
       });
     },
-    getStockString(){
-      let that=this;
-      this.axios.post("/api/v1/wmsh/getLoadPortStockList?apiId=158&i=").then((res)=>{
-        console.log(res);
-        if(res.status=="200"){
-          let resultActualInstallations = 0;
-          res.data.data.list.forEach((e) => {
-            resultActualInstallations = resultActualInstallations + e.gmTonnage;
-          }); 
+    getStockString() {
+      let that = this;
+      this.axios
+        .post("/api/v1/wmsh/getLoadPortStockList?apiId=158&i=")
+        .then(res => {
+          console.log(res);
+          if (res.status == "200") {
+            let resultActualInstallations = 0;
+            res.data.data.list.forEach(e => {
+              resultActualInstallations =
+                resultActualInstallations + e.gmTonnage;
+            });
 
-          this.stockString +='万港库存'+ resultActualInstallations.toFixed(2) + "吨:";
-          this.stockStringArr.push({
-            class:"normal",
-            value:'万港库存'+ resultActualInstallations.toFixed(2) + "吨:"
-          });
+            this.stockString +=
+              "万港库存" + resultActualInstallations.toFixed(2) + "吨:";
+            this.stockStringArr.push({
+              class: "normal",
+              value: "万港库存" + resultActualInstallations.toFixed(2) + "吨:"
+            });
 
-          let materialName=res.data.data.list[0].materialName;
-          this.stockStringArr.push({
-            class:"black",
-            value:materialName+res.data.data.list[0].totalTonnage+"吨:"
-          })
-          this.stockString+=(materialName+res.data.data.list[0].totalTonnage+"吨 ");
+            let materialName = res.data.data.list[0].materialName;
+            this.stockStringArr.push({
+              class: "black",
+              value: materialName + res.data.data.list[0].totalTonnage + "吨:"
+            });
+            this.stockString +=
+              materialName + res.data.data.list[0].totalTonnage + "吨 ";
 
-          res.data.data.list.forEach((e) => {
-            if(e.materialName==materialName){
-              this.stockString+=(" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 ");
-               this.stockStringArr.push({
-                  class:"normal",
-                  value:" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 "
+            res.data.data.list.forEach(e => {
+              if (e.materialName == materialName) {
+                this.stockString +=
+                  " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 ";
+                this.stockStringArr.push({
+                  class: "normal",
+                  value:
+                    " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 "
                 });
-            }else{
-              materialName=e.materialName;
-              this.stockString+=(materialName+res.data.data.list[0].totalTonnage+"吨 ");
-              this.stockString+=(";"+materialName+e.totalTonnage+ "吨:"+" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 ");
-               this.stockStringArr.push({
-                class:"black",
-                value:";"+materialName+e.totalTonnage+ "吨:"
-              })
-              this.stockString+=(";"+materialName+e.totalTonnage+ "吨:"+" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 ");
-               this.stockStringArr.push({
-                class:"normal",
-                value:" “"+e.resultForeignShipName+"”"+e.gmTonnage+"吨 "
-              })
-            }
-          });
-          console.log("arr:",this.stockStringArr);
-        }else{
-
-        }
-      });
+              } else {
+                materialName = e.materialName;
+                this.stockString +=
+                  materialName + res.data.data.list[0].totalTonnage + "吨 ";
+                this.stockString +=
+                  ";" +
+                  materialName +
+                  e.totalTonnage +
+                  "吨:" +
+                  " “" +
+                  e.resultForeignShipName +
+                  "”" +
+                  e.gmTonnage +
+                  "吨 ";
+                this.stockStringArr.push({
+                  class: "black",
+                  value: ";" + materialName + e.totalTonnage + "吨:"
+                });
+                this.stockString +=
+                  ";" +
+                  materialName +
+                  e.totalTonnage +
+                  "吨:" +
+                  " “" +
+                  e.resultForeignShipName +
+                  "”" +
+                  e.gmTonnage +
+                  "吨 ";
+                this.stockStringArr.push({
+                  class: "normal",
+                  value:
+                    " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 "
+                });
+              }
+            });
+            console.log("arr:", this.stockStringArr);
+          } else {
+          }
+        });
     }
-  },
+  }
 };
 </script>
 
@@ -276,8 +281,8 @@ export default {
     font-size: 20px;
     font-weight: 700;
   }
-  .black{
-      font-weight: 1000;
+  .black {
+    font-weight: 1000;
   }
 }
 </style>

+ 4 - 2
src/views/statisticalReport/components/defendCapacity/getCapacityByDefend.vue

@@ -35,7 +35,7 @@
         clearable
       >
       </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
+      <el-button type="primary" class="btn" @click="onclickSearch">
         <i class="el-icon-search"></i>查询
       </el-button>
     </div>
@@ -134,7 +134,8 @@ export default {
     getRequestUrl() {
       this.option.requestUrl =
         "/api/v1/tms/getCapacityByDefend?apiId=474&startTime=null&endTime=null&i=" +
-        new Date();
+        new Date() +
+        "&con=" + this.input;
     },
     // 添加开始结束时间筛选
     onclickSearch() {
@@ -156,6 +157,7 @@ export default {
             startTime +
             "&endTime=" +
             endTime +
+            "&con=" + this.input +
             "&i=" +
             new Date();
         } else {

+ 295 - 0
src/views/statisticalReport/components/dowmShipDynamicTable.vue

@@ -0,0 +1,295 @@
+<template>
+  <!-- 万州港作业报表 -->
+  <div class="dowmShipDynamicTable" style="width:100%">
+    <div style="height:100%;width:100%">
+      <div class="search" style="display:flex;margin: 10px;">
+        <el-input
+          placeholder="请输入"
+          v-model="map.input"
+          style="margin: 10px; width:10%"
+          clearable
+        ></el-input>
+       <el-date-picker style="margin: 10px;" v-model="map.startTime" type="datetime" placeholder="起始日期"></el-date-picker>
+      <el-date-picker style="margin: 10px;" v-model="map.endTime" type="datetime" placeholder="结束日期"></el-date-picker>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="getTableData()"
+          style="margin: 10px;"
+        >
+          <i class="el-icon-search"></i>查询
+        </el-button>
+      </div>
+      <!-- 下游港口船舶动态表 -->
+      <div class="loadData" style="height:500px;margin-left:5px;width:100%">
+        <!-- <div style="font-size:16px;color:red">港口装车数据:共{{count}}车</div> -->
+        <div class="loadTable" style="height:500px;overflow:scroll;width:100%">
+        <el-table
+          ref="loadTable"
+          highlight-current-row
+          empty-text="请查询数据"
+          border
+          fit
+          show-summary
+          :summary-method="getSummaries"
+          :span-method="objectSpanMethod"
+          :data="tableData"
+          :row-style="{height:'40px'}"
+          style="width: 100%;font-size: 18px">
+          <el-table-column
+          align="center"
+            prop="portName"
+            label="放货港口"
+            width="100px">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="productName"
+            label="品种/数量/放货日期"
+            >
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="gmTonnage"
+            label="港口库存"
+            width="100px">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="capacityNumber"
+            label="船名"
+            width="150px">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="planLoadTon"
+            label="计划吨位"
+            width="100px">
+          </el-table-column>
+           <el-table-column
+          align="center"
+          prop="shipDynamic"
+            label="船舶动态"
+            width="250px">
+            <template slot-scope="scope">
+                <el-input v-model="scope.row.shipDynamic"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column
+          align="center"
+            label="装船(吨)"
+            prop="loadDetails"
+            width="250px">
+            <template slot-scope="scope">
+            <el-input v-model="scope.row.loadDetails"></el-input>
+            </template>
+          </el-table-column>
+           <el-table-column fixed="right" label="操作" align="center" width="50">
+            <template slot-scope="scope">
+                <el-button @click="updateDynamic(scope.row)" type="text" size="small">保存</el-button>
+            </template>
+      </el-table-column>
+        </el-table>
+        </div >
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import {getCookie} from "@/utils/util.js";
+import BigNumber from "bignumber.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+        tableData:[],
+        spanArr: [], // 用于存放需要合并的行的个数
+        spanIndex: 0, // 记录spanArr数组的下标
+        spanArr2: [], // 用于存放需要合并的行的个数
+        spanIndex2: 0, // 记录spanArr数组的下标
+        spanArr3:[],
+        spanIndex:0,
+        map:{
+            input:"",
+            startTime:null,
+            endTime:null
+        },
+    };
+  },
+  mounted(){
+    //this.getTableData();
+  },
+  methods: {
+    //查询表格数据
+    getTableData(){
+      console.log("map",this.map);
+      //时间校验
+      if(this.map.startTime && this.map.endTime){
+        if(this.map.startTime>=this.map.endTime){
+            this.$message({
+                message:"结束日期必须大于起始日期!",
+                type:"warning",
+                duration:2000
+            });
+            return;
+        }
+        this.map.startTime=sjTime(this.map.startTime);
+        this.map.endTime=sjTime(this.map.endTime);
+      }else if((this.map.startTime && !this.map.endTime) || (!this.map.startTime && this.map.endTime)){
+        this.$message({
+            message:"起止日期错误!",
+            type:"warning",
+            duration:2000
+        });
+        return;
+      }
+      //发送请求
+      this.axios.post('/api/v1/tms/getDownShipDynamaics',this.map).then((res)=>{
+        if(res.data.code == "200"){
+            this.getSpanArr(res.data.data);//先得到合并数组
+            return Promise.resolve(res);
+        }else {
+          this.$message({
+              type: "error",
+              message: res.data.data,
+          });
+        }
+      }).then((res)=>{
+        //再给表格赋值
+        this.tableData=res.data.data;
+      });
+    },
+    updateDynamic(row){
+        console.log("row:",row);
+        if(!row.instructionsCapacityId){
+             this.$message.warning("无法保存,请先操作装船指令!");
+             return;
+        }
+        this.axios.post('/api/v1/tms/updateInstructionsCapacity',row).then((res)=>{
+            if(res.data.code == "200"){
+                this.$message.success("保存成功!");
+                this.getTableData();
+            }else {
+                this.$message({
+                    type: "error",
+                    message: res.data.data,
+                });
+            }
+        });
+    },
+    getSummaries(param) {
+        console.log("param",param);
+        const { columns, data } = param;
+        const sums = [];
+        columns.forEach((column, index) => {
+          if (index === 0) {
+            sums[index] = '合计';
+            return;
+          }
+          if (index === 3 || index===5) {
+            sums[index] = '';
+            return;
+          }
+          if(index === 2){
+            let sum=new BigNumber(0);
+            data.forEach((row,rowIndex)=>{
+              if(rowIndex ==0 || row.gmId !=  data[rowIndex-1].gmId){
+                sum=sum.plus(row.gmTonnage);
+              }
+            })
+            sums[index] = sum.toNumber();
+            return; 
+          }
+          const values = data.map(item => Number(item[column.property]));
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return new BigNumber(prev).plus(curr).toNumber();
+              } else {
+                return prev;
+              }
+            }, 0);
+          } else {
+            sums[index] = '';
+          }
+        });
+        return sums;
+    },
+    //处理数据,得到合并数组
+    getSpanArr(data) {
+        this.spanArr=[];
+        this.spanArr2=[];
+        this.spanArr3=[];
+        for (let i = 0; i < data.length; i++) {
+            if (i == 0) {
+                this.spanArr.push(1);
+                this.spanArr2.push(1);
+                this.spanArr3.push(1);
+                this.spanIndex = 0;
+                this.spanIndex2 = 0;
+                this.spanIndex3 = 0;
+            } else {
+                // 判断当前行与前一行内容是否相同:港口名
+                if (data[i].portName == data[i - 1].portName) {
+                    this.spanArr[this.spanIndex] += 1; // 相同的话,当前下标所代表的值加一,例如:第一列的前三行可合并
+                    this.spanArr.push(0);// 记录完毕后,再往数组里添加一个元素0,作为下一次合并的初始值
+                } else {
+                    this.spanArr.push(1); // 否则,依旧是一行
+                    this.spanIndex = i;
+                }
+                // 判断当前行与前一行内容是否相同:发货通知
+                if (data[i].productName == data[i - 1].productName) {
+                    this.spanArr2[this.spanIndex2] += 1; // 相同的话,当前下标所代表的值加一,例如:第一列的前三行可合并
+                    this.spanArr2.push(0);// 记录完毕后,再往数组里添加一个元素0,作为下一次合并的初始值
+                } else {
+                    this.spanArr2.push(1); // 否则,依旧是一行
+                    this.spanIndex2 = i;
+                }
+                // 判断当前行与前一行内容是否相同:港口库存
+                if (data[i].gmId == data[i - 1].gmId) {
+                    this.spanArr3[this.spanIndex3] += 1; // 相同的话,当前下标所代表的值加一,例如:第一列的前三行可合并
+                    this.spanArr3.push(0);// 记录完毕后,再往数组里添加一个元素0,作为下一次合并的初始值
+                } else {
+                    this.spanArr3.push(1); // 否则,依旧是一行
+                    this.spanIndex3 = i;
+                }
+            }
+        }
+        console.log("spanArr",this.spanArr);
+    },
+    //合并
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+        if (columnIndex === 0) {
+            const _row = this.spanArr[rowIndex]; // 行数
+            const _col = _row > 0 ? 1 : 0; // 列数
+            return {
+                rowspan: _row,
+                colspan: _col
+            };
+        }else if(columnIndex === 1){
+            const _row = this.spanArr2[rowIndex]; // 行数
+            const _col = _row > 0 ? 1 : 0; // 列数
+            return {
+                rowspan: _row,
+                colspan: _col
+            };
+        }else if(columnIndex === 2){
+            const _row = this.spanArr3[rowIndex]; // 行数
+            const _col = _row > 0 ? 1 : 0; // 列数
+            return {
+                rowspan: _row,
+                colspan: _col
+            };
+        }
+    },
+  },
+};
+</script>
+<style lang='scss'>
+
+</style>
+

+ 126 - 17
src/views/statisticalReport/components/loadCapacityDetail/loadCapacityDetail.vue

@@ -3,7 +3,11 @@
   <div class="loadCapacityDetail">
     <div class="frameCalculation">
       <span>装车开始时间</span>
-      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
       </el-date-picker>
       <span>至</span>
       <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
@@ -11,23 +15,39 @@
       <el-button type="primary" class="btn" @click="onclickSearch">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" @click="exportData()"
+      <el-button type="primary" @click="exportSignleReport"
         ><i class="el-icon-download"></i>导出(Excel)</el-button
       >
       <span style="margin-left: 1rem;">合计净重:</span>
-      <el-input v-model="totalNumber" :disabled="true" style="width: 100px;"></el-input>
+      <el-input
+        v-model="totalNumber"
+        :disabled="true"
+        style="width: 100px;"
+      ></el-input>
       <span style="margin-left: 1rem;">合计车数:</span>
-      <el-input v-model="totalCapacity" :disabled="true" style="width: 100px;"></el-input>
-     
-       <el-input placeholder="请输入装机车牌号/可查询当天车辆数据" v-model="input" style="width: 220px;margin-left: 1rem;" clearable>
+      <el-input
+        v-model="totalCapacity"
+        :disabled="true"
+        style="width: 100px;"
+      ></el-input>
+
+      <el-input
+        placeholder="请输入装机车牌号/可查询当天车辆数据"
+        v-model="input"
+        style="width: 220px;margin-left: 1rem;"
+        clearable
+      >
       </el-input>
-         <el-button type="primary" class="btn" @click="onclickCapacity">
+      <el-button type="primary" class="btn" @click="onclickCapacity">
         <i class="el-icon-search"></i>查询
       </el-button>
-   
     </div>
     <div class="table">
-      <mergeRowTable ref="excelDom" v-bind.sync="option" @func="func"></mergeRowTable>
+      <mergeRowTable
+        ref="excelDom"
+        v-bind.sync="option"
+        @func="func"
+      ></mergeRowTable>
     </div>
   </div>
 </template>
@@ -42,15 +62,17 @@ export default {
       totalCapacity: null,
       startTime: null,
       endTime: null,
-
       input: "",
       tableTitle: "装机计重明细报表",
       option: {
         // 表格请求数据的地址
         requestUrl: "api/v1/tms/getLoaderForResultDetail?apiId=480",
         comparison: "orderNumber",
-        columnIndexs: [0, 1, 2, 4, 5, 6],
+        columnIndexs: [0, 1, 2, 4, 5, 6]
       },
+      inwardArr: [],
+      tableTitle: "装机计重明细",
+      totalArr: []
     };
   },
   created() {
@@ -74,11 +96,98 @@ export default {
     }
   },
   methods: {
+    exportSignleReport() {
+      if (this.startTime && this.endTime) {
+        this.openFullScreen1();
+      } else {
+        this.$confirm(
+          "没有输入时间区间,系统将默认导出今天0点到24点的单个报表数据,是否继续?",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }
+        )
+          .then(() => {
+            this.openFullScreen1();
+          })
+          .catch(() => {
+            this.$message.info("取消导出");
+          });
+      }
+    },
+    openFullScreen1() {
+      let startTime = null;
+      let endTime = null;
+      let orgCode = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      if (
+        getCookie("orgCode") != "dagangadmin" &&
+        getCookie("orgCode") != "zidonghuabu" &&
+        getCookie("orgCode") != "wuliuchuyunzhongxin"
+      ) {
+        orgCode = getCookie("orgCode");
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: "请等待导出",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      this.axios
+        .post(
+          "/api/v1/tms/getLoaderForResultDetail?apiId=480&isPage=yes&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&orgCode=" +
+            orgCode
+        )
+        .then(res => {
+          this.totalArr = [];
+          this.inwardArr = [];
+          this.tableTitle = "装机计重明细统计";
+          this.inwardArr = res.data.data;
+          this.totalArr = this.totalArr.concat(this.inwardArr);
+          this.exportAllReportToExcel();
+          setTimeout(() => {
+            loading.close();
+          }, 2000);
+        });
+    },
+    exportAllReportToExcel() {
+      var title = this.tableTitle;
+      let tHeader = [];
+      let filterVal = [];
+      this.dataColumnData.forEach(e1 => {
+        if (tHeader.indexOf(e1.label) === -1) {
+          tHeader.push(e1.label);
+        }
+        if (filterVal.indexOf(e1.prop) === -1) {
+          filterVal.push(e1.prop);
+        }
+      });
+      //导出为excel
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        // let list = this.$refs.excelDom.dataTabel;
+        let data = this.totalArr.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+      });
+    },
     func(res) {
+      this.dataColumnData = res.columnData;
       console.log(res);
       var resultNetWeightTotal = 0;
       var currentCapacityTotal = 0;
-      res.list.forEach((e) => {
+      res.list.forEach(e => {
         currentCapacityTotal++;
         resultNetWeightTotal = resultNetWeightTotal + e.resultNetWeight;
       });
@@ -92,13 +201,13 @@ export default {
     getRequestUrl() {
       if (
         getCookie("orgCode") == "dagangadmin" ||
-        getCookie("orgCode") == "zidonghuabu"||
-        getCookie("orgCode")=="wuliuchuyunzhongxin"
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
       ) {
         this.option.requestUrl =
           "/api/v1/tms/getLoaderForResultDetail?apiId=480&startTime=null&endTime=null&i=" +
           new Date();
-      }  else {
+      } else {
         this.option.requestUrl =
           "/api/v1/tms/getLoaderForResultDetail?apiId=480&userId=" +
           getCookie("orgCode") +
@@ -150,8 +259,8 @@ export default {
       } else {
         this.getRequestUrl();
       }
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>

+ 193 - 96
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelAllReport.vue

@@ -83,11 +83,11 @@
         :span-method="objectSpanMethod"
         ref="tableRef"
         border
-        stripe
         style="width: 100%; margin-top: 20px"
         @cell-click="cellClik"
+        @row-click="rowClick"
         :row-style="{ height: '30px' }"
-        :cell-style="{ fontWeight: '700' }"
+        :cell-style="{ fontWeight: '500' }"
         :key="saleSteelKey"
         id="salesLogisticsStat_saleSteelAllReport_table"
         individual-panel
@@ -98,7 +98,6 @@
           width="50"
           label="序号"
           align="center"
-          fixed="left"
           :resizable="false"
         >
           <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
@@ -106,26 +105,24 @@
         <el-table-column
           prop="consigneeName"
           label="下单客户"
-          :width="flexColumnWidth('consigneeName', tableData, 'max')"
+          width="160px"
           align="center"
-          fixed
+          show-overflow-tooltip
         >
         </el-table-column>
         <el-table-column
           prop="carrierName"
           label="承运商"
           align="center"
-          width="250px"
-          fixed
+          width="120px"
         >
           <template slot-scope="scope">
             <el-autocomplete
-              style="width: 120px"
+              style="width: 100px"
               v-model="scope.row.carrierName"
               :fetch-suggestions="querySearchCarrier"
               placeholder="请输入承运商"
               @select="handleSelectCarrier(scope.row, scope.$index)"
-              :disabled="scope.row.isCarrierShow != 1"
             >
             </el-autocomplete>
             <el-button
@@ -141,8 +138,7 @@
           column-key="capacityNo"
           label="车牌号"
           align="center"
-          width="250px"
-          fixed
+          width="150px"
         >
           <template slot-scope="scope">
             <el-autocomplete
@@ -151,7 +147,6 @@
               :fetch-suggestions="querySearch"
               placeholder="请输入车牌号"
               @select="handleSelect(scope.row, scope.$index)"
-              :disabled="scope.row.isCapacityShow != 1"
             ></el-autocomplete>
             <el-button
               @click="updateCapacity(scope.row)"
@@ -187,7 +182,6 @@
             </button>
             <input
               v-model="scope.row.materialNum"
-              disabled
               style="
                 width: 40px;
                 height: 40px;
@@ -214,7 +208,6 @@
               style="width: 280px"
               v-model="scope.row.addressPlace"
               placeholder="请输入收货地址"
-              :disabled="scope.row.isAddressShow != 1"
             ></el-input>
             <el-button
               @click="updateAddress(scope.row)"
@@ -242,13 +235,15 @@
         <el-table-column
           prop="arrivalAddress"
           label="抵达地址"
-          :width="flexColumnWidth('arrivalAddress', tableData, 'max')"
+          width="280px"
+          show-overflow-tooltip
         >
         </el-table-column>
         <el-table-column
           prop="receiptAddress"
           label="签收地址"
-          :width="flexColumnWidth('receiptAddress', tableData, 'max')"
+          width="280px"
+          show-overflow-tooltip
         >
         </el-table-column>
         <el-table-column
@@ -269,7 +264,6 @@
               style="width: 120px"
               v-model="scope.row.capacityTel"
               placeholder="请输入电话号码"
-              :disabled="scope.row.isTelShow != 1"
             ></el-input>
             <el-button
               @click="updateDriverTel(scope.row)"
@@ -306,12 +300,15 @@
           width="100px"
         >
         </el-table-column>
+        <el-table-column prop="closeEntryId" label="金蝶分录ID" width="100px">
+        </el-table-column>
         <el-table-column
-          label="操作"
+          label="分录操作"
           prop="singleOp"
           fixed="right"
           width="120px"
           align="center"
+          v-if="operateShow == 1"
         >
           <template slot-scope="scope">
             <el-button
@@ -328,14 +325,22 @@
               v-if="scope.row.deletedStatus != null"
               >反关闭分录</el-button
             >
+            <el-button
+              type="text"
+              size="small"
+              @click="adverseCloseSaleMaterial(scope.row)"
+              v-if="scope.row.deletedStatus != null"
+              >反关闭分录</el-button
+            >
           </template>
         </el-table-column>
         <el-table-column
           prop="someSignle"
-          label="操作"
+          label="整车操作"
           fixed="right"
-          width="120px"
+          width="80px"
           align="center"
+          v-if="operateShow == 1"
         >
           <template slot-scope="scope">
             <el-button
@@ -344,8 +349,8 @@
               @click="deleteEasEntryId(scope.row)"
               v-if="
                 scope.row.carStatus == 4 ||
-                scope.row.carStatus == 5 ||
-                scope.row.carStatus == null
+                  scope.row.carStatus == 5 ||
+                  scope.row.carStatus == null
               "
               >关闭车辆</el-button
             >
@@ -445,16 +450,16 @@ export default {
       options: [
         {
           value: "下单客户",
-          lable: "下单客户",
+          lable: "下单客户"
         },
         {
           value: "承运商",
-          lable: "承运商",
+          lable: "承运商"
         },
         {
           value: "车牌号",
-          lable: "车牌号",
-        },
+          lable: "车牌号"
+        }
       ],
       startTime: null,
       endTime: null,
@@ -470,8 +475,26 @@ export default {
       pos: 0,
       isCellClick: 0,
       columnIndexs: [
-        0, 1, 2, 3, 7, 8, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
-        29,
+        0,
+        1,
+        2,
+        3,
+        7,
+        8,
+        14,
+        16,
+        17,
+        18,
+        19,
+        20,
+        21,
+        22,
+        23,
+        24,
+        25,
+        26,
+        27,
+        29
       ],
       mergeList: [
         "someSignle",
@@ -494,11 +517,38 @@ export default {
         "consigneeTel",
         "isSelfMention"
       ],
+      mergeList: [
+        "序号",
+        "整车操作",
+        "销售订单状态",
+        "销售订单号",
+        "发货单位",
+        "司机电话",
+        "运输订单号",
+        "签收地址",
+        "抵达地址",
+        "出厂时间",
+        "进厂时间",
+        "运单状态",
+        "车牌号",
+        "承运商",
+        "下单客户",
+        "收货地址"
+      ],
       //钢材多拼车辆线路ID
       //索引从1-10为1-10拼路线ID
       lineSpelling: [
-        0, 110001, 110002, 110003, 110004, 110005, 110006, 110007, 110008,
-        110009, 110010,
+        0,
+        110001,
+        110002,
+        110003,
+        110004,
+        110005,
+        110006,
+        110007,
+        110008,
+        110009,
+        110010
       ],
       tableTitle: "销售钢材统计报表",
       //所有省
@@ -524,7 +574,8 @@ export default {
       //省市县Id
       addressId: null,
       addressRow: {},
-      saleSteelKey:false
+      operateShow: 0,
+      saleSteelKey: false
     };
   },
   created() {},
@@ -532,20 +583,27 @@ export default {
     this.getSteelReport();
   },
   methods: {
+    rowClick() {
+      if (this.operateShow == 1) {
+        this.operateShow = 0;
+      } else {
+        this.operateShow = 1;
+      }
+    },
     //反关闭整条分录
     adverseCloseSaleMaterial(row) {
       console.log(row.saleMaterialId);
       this.$confirm("确定反关闭该条分录?", "提示", {
         cancelButtonText: "确定",
         confirmButtonText: "取消",
-        center: true,
+        center: true
       }).then(() => {
         this.axios
           .post(
             "/api/v1/ams/adverseCloseSaleMaterial?saleMaterialId=" +
               row.saleMaterialId
           )
-          .then((res) => {
+          .then(res => {
             if (res.data.code == "200") {
               this.$message.success("反关闭成功");
               this.getSteelReport();
@@ -567,35 +625,35 @@ export default {
         lock: true,
         text: "正在导出Excel",
         spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
+        background: "rgba(0, 0, 0, 0.7)"
       });
       var title = this.tableTitle;
       let tHeader = [];
       let filterVal = [];
       this.$refs.tableRef.columns.forEach(item => {
-          if (item.label != undefined && item.property != undefined) {
-              arr.push(item.property);
-          }
+        if (item.label != undefined && item.property != undefined) {
+          arr.push(item.property);
+        }
       });
 
-      for (var k = 0; k < arr.length; k++){
+      for (var k = 0; k < arr.length; k++) {
         var prop = arr[k];
         this.$refs.tableRef.$children.forEach(item => {
-          console.log('itme.prop',item.prop,prop);
-            if(item.prop === prop){
-              tHeader.push(item.label);
-              filterVal.push(item.prop);
-              return true;
-            }    
+          console.log("itme.prop", item.prop, prop);
+          if (item.prop === prop) {
+            tHeader.push(item.label);
+            filterVal.push(item.prop);
+            return true;
+          }
         });
       }
 
       this.downloadLoading = true;
       require.ensure([], () => {
         const {
-          export_json_to_excel,
+          export_json_to_excel
         } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
-        let data = this.tableData.map((v) => filterVal.map((j) => v[j])); //3.formatJson格式转换
+        let data = this.tableData.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
         export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
       });
       loading.close();
@@ -606,7 +664,7 @@ export default {
     cellClik(row, column, cell, event) {
       if (row.group != this.clickIndex) {
         // this.getSteelReport();
-        this.tableData.forEach((item) => {
+        this.tableData.forEach(item => {
           if (item.group == this.clickIndex) {
             this.$set(item, "isCapacityShow", 0);
             this.$set(item, "isCarrierShow", 0);
@@ -639,7 +697,7 @@ export default {
     },
     //承运商弹出层
     handleSelectCarrier(row, index, item) {
-      this.carrierList.forEach((item) => {
+      this.carrierList.forEach(item => {
         if (item.carrierName == row.carrierName) {
           row.newCarrierId = item.carrierId;
           row.carrierId = item.carrierId;
@@ -651,7 +709,7 @@ export default {
       if (queryString.length > 1) {
         this.axios
           .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
-          .then((res) => {
+          .then(res => {
             if (res.data.code == "200") {
               this.carrierList = [];
               if (res.data.data.length == 0) {
@@ -669,7 +727,7 @@ export default {
       }
     },
     createFilterCarrier(queryString) {
-      return (restaurants) => {
+      return restaurants => {
         return (
           restaurants.value1.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -681,7 +739,7 @@ export default {
       if (queryString.length > 3) {
         this.axios
           .post("/api/v1/uc/getCapacityByLike?index=" + queryString)
-          .then((res) => {
+          .then(res => {
             this.capacityList = [];
             if (res.data.code == "200") {
               if (res.data.data.length == 0) {
@@ -700,7 +758,7 @@ export default {
       }
     },
     createFilter(queryString) {
-      return (restaurants) => {
+      return restaurants => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -709,13 +767,14 @@ export default {
     },
     //车牌号弹出层
     handleSelect(row, index) {
-      this.capacityList.forEach((item) => {
+      this.capacityList.forEach(item => {
         if (item.capacityNumber === row.capacityNo) {
           row.newsCapacityId = item.capacityId;
         }
       });
     },
     updateCapacity(row) {
+      row.capacityId = row.newsCapacityId;
       if (row.newsCapacityId == null) {
         this.$message.warning("请先注册车牌号或者选中弹出后再提交!");
         return;
@@ -729,11 +788,11 @@ export default {
           lock: true,
           text: "正在变更车牌号",
           spinner: "el-icon-loading",
-          background: "rgba(0, 0, 0, 0.7)",
+          background: "rgba(0, 0, 0, 0.7)"
         });
         this.axios
           .post("/api/v1/ams/updateCapacityNumberInFactory", row)
-          .then((res) => {
+          .then(res => {
             if (res.data.code == 200) {
               this.$message.success("变更车牌号成功!");
               this.getSteelReport();
@@ -755,7 +814,7 @@ export default {
           return;
         }
         let i = 0;
-        this.tableData.forEach((e) => {
+        this.tableData.forEach(e => {
           if (row.group == e.group) {
             i++;
           }
@@ -769,11 +828,11 @@ export default {
           lock: true,
           text: "正在变更车牌号",
           spinner: "el-icon-loading",
-          background: "rgba(0, 0, 0, 0.7)",
+          background: "rgba(0, 0, 0, 0.7)"
         });
         this.axios
           .post("/api/v1/ams/dispatchSteelOrder", arr)
-          .then((res) => {
+          .then(res => {
             if (res.data.code == "200") {
               this.$message.success("派车成功!");
               this.getSteelReport();
@@ -797,7 +856,7 @@ export default {
         lock: true,
         text: "修改电话号码中",
         spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
+        background: "rgba(0, 0, 0, 0.7)"
       });
       if (row.capacityTel == null || row.capacityTel == "") {
         this.$message.error("电话号码不能为空");
@@ -806,9 +865,9 @@ export default {
       this.axios
         .post("/api/v1/uc/updateDriverTel", {
           orderId: parseInt(row.orderId),
-          driverTel: row.capacityTel,
+          driverTel: row.capacityTel
         })
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             this.$message.success("修改成功");
             this.getSteelReport();
@@ -831,7 +890,7 @@ export default {
         confirmButtonText: "是",
         cancelButtonText: "否",
         center: true,
-        type: "warning",
+        type: "warning"
       })
         .then(() => {
           let map = row;
@@ -840,11 +899,11 @@ export default {
             lock: true,
             text: "正在关闭车辆",
             spinner: "el-icon-loading",
-            background: "rgba(0, 0, 0, 0.7)",
+            background: "rgba(0, 0, 0, 0.7)"
           });
           this.axios
             .post("/api/v1/ams/updateCarAddress", map)
-            .then((res) => {
+            .then(res => {
               if (res.data.code == "200") {
                 this.$message.success("关闭车辆成功");
                 this.getSteelReport();
@@ -877,11 +936,11 @@ export default {
           lock: true,
           text: "正在修改承运商授权",
           spinner: "el-icon-loading",
-          background: "rgba(0, 0, 0, 0.7)",
+          background: "rgba(0, 0, 0, 0.7)"
         });
         this.axios
           .post("/api/v1/ams/updateTruckNoCarrier", row)
-          .then((res) => {
+          .then(res => {
             if (res.data.code == "200") {
               this.$message.success("修改承运商授权成功");
               this.getSteelReport();
@@ -905,11 +964,11 @@ export default {
           lock: true,
           text: "正在授权承运商",
           spinner: "el-icon-loading",
-          background: "rgba(0, 0, 0, 0.7)",
+          background: "rgba(0, 0, 0, 0.7)"
         });
         this.axios
           .post("/api/v1/ams/dispatchToCarrier", arr)
-          .then((res) => {
+          .then(res => {
             if (res.data.code == "200") {
               this.$message.success("授权承运商成功");
               this.getSteelReport();
@@ -940,7 +999,7 @@ export default {
     },
     //获取所有省数据
     getAllProvince() {
-      this.axios.post("/api/v1/uc/getAllProvince").then((res) => {
+      this.axios.post("/api/v1/uc/getAllProvince").then(res => {
         this.provinceList = res.data.data;
       });
     },
@@ -953,7 +1012,7 @@ export default {
             "&i=" +
             new Date()
         )
-        .then((res) => {
+        .then(res => {
           this.cityList = res.data.data;
           // this.city = "";
           // this.county = "";
@@ -968,7 +1027,7 @@ export default {
             "&i=" +
             new Date()
         )
-        .then((res) => {
+        .then(res => {
           this.countyList = res.data.data;
         });
     },
@@ -977,13 +1036,11 @@ export default {
       let mapValue = {
         addressProvince: this.province,
         addressDistrict: this.city,
-        addressTown: this.county,
+        addressTown: this.county
       };
-      this.axios
-        .post("/api/v1/uc/getPlaceByAllAddress", mapValue)
-        .then((res) => {
-          this.addressId = res.data.data[0].addressId;
-        });
+      this.axios.post("/api/v1/uc/getPlaceByAllAddress", mapValue).then(res => {
+        this.addressId = res.data.data[0].addressId;
+      });
     },
     //收货地址弹出层
     handleSelect1(item) {
@@ -998,7 +1055,7 @@ export default {
             "&index=" +
             queryString
         )
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             var restaurants = res.data.data;
             var results = queryString
@@ -1010,7 +1067,7 @@ export default {
         });
     },
     createFilter1(queryString) {
-      return (restaurants) => {
+      return restaurants => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
@@ -1023,7 +1080,7 @@ export default {
         lock: true,
         text: "正在修改收货地址",
         spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
+        background: "rgba(0, 0, 0, 0.7)"
       });
       let map = this.addressRow;
       map.isCloseEas = Number(1);
@@ -1032,7 +1089,7 @@ export default {
       map.shipperAddressId = this.addressId;
       this.axios
         .post("/api/v1/ams/updateCarAddress", map)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             this.$message.success("修改收货地址成功!");
             this.getSteelReport();
@@ -1074,7 +1131,7 @@ export default {
           }
         }
         this.totalCapacity = data[data.length - 1].group + 1;
-        this.totalNumber = data.reduce(function (prev, item) {
+        this.totalNumber = data.reduce(function(prev, item) {
           return prev + item.materialNum;
         }, 0);
       }
@@ -1085,7 +1142,7 @@ export default {
         const _col = _row > 0 ? 1 : 0;
         return {
           rowspan: _row,
-          colspan: _col,
+          colspan: _col
         };
       }
     },
@@ -1095,11 +1152,11 @@ export default {
         lock: true,
         text: "修改物资件数中",
         spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
+        background: "rgba(0, 0, 0, 0.7)"
       });
       let map = {
         materialId: row.materialId,
-        materialNum: row.materialNum,
+        materialNum: row.materialNum
       };
       let arr = [];
       arr.push(map);
@@ -1107,11 +1164,11 @@ export default {
         orderId: row.orderId,
         saleOrderId: row.saleOrderId,
         saleOrderMaterialId: row.saleOrderMaterialId,
-        mapList: arr,
+        mapList: arr
       };
       this.axios
         .post("/api/v1/oms/updateMaterialMes", updateMap)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             this.$message.success("修改物资数量成功");
             this.getSteelReport();
@@ -1135,7 +1192,7 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         center: true,
-        inputPlaceholder: "请输入关闭理由",
+        inputPlaceholder: "请输入关闭理由"
       })
         .then(({ value }) => {
           if (value != null || value != "") {
@@ -1143,7 +1200,7 @@ export default {
               lock: true,
               text: "正在关闭该条分录",
               spinner: "el-icon-loading",
-              background: "rgba(0, 0, 0, 0.7)",
+              background: "rgba(0, 0, 0, 0.7)"
             });
             let map = {
               orderId: row.orderId,
@@ -1151,11 +1208,11 @@ export default {
               saleMaterialId: row.saleMaterialId,
               reason: value,
               number: row.saleOrderNo,
-              closeEntryId: row.closeEntryId,
+              closeEntryId: row.closeEntryId
             };
             this.axios
               .post("/api/v1/ams/closeSteelMaterialId", map)
-              .then((res) => {
+              .then(res => {
                 if (res.data.code == "200") {
                   this.$message.success("关闭成功");
                   this.getSteelReport();
@@ -1227,8 +1284,9 @@ export default {
             "&saler=" +
             saler
         )
-        .then((res) => {
+        .then(res => {
           this.tableData = res.data.data;
+          this.operateShow = 0;
           this.getSpanArr(res.data.data);
         });
     },
@@ -1238,8 +1296,33 @@ export default {
     },
     //获取钢材统计报表
     getSteelReport() {
+      let startTime = null;
+      let endTime = null;
       let carrierSsoId = null;
+      let carrierName = null;
+      let consigneeName = null;
+      let capacityNo = null;
+      let remark = null;
       let saler = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      if (getCookie("orgCode") == "chengyunshang") {
+        carrierSsoId = getCookie("userId");
+      }
+      if (getCookie("orgCode") == "xiaoshouyewuyuan") {
+        saler = getCookie("loginName");
+      }
+      if (this.screen == "下单客户") {
+        consigneeName = this.input;
+      } else if (this.screen == "承运商") {
+        carrierName = this.input;
+      } else if (this.screen == "车牌号") {
+        capacityNo = this.input;
+      } else {
+        remark = this.input;
+      }
       if (getCookie("orgCode") == "chengyunshang") {
         carrierSsoId = getCookie("userId");
       }
@@ -1257,11 +1340,20 @@ export default {
             "&saler=" +
             saler +
             "&i=" +
-            new Date()
+            new Date() +
+            "&remark=" +
+            remark +
+            "&consigneeName=" +
+            consigneeName +
+            "&carrierName=" +
+            carrierName +
+            "&capacityNo=" +
+            capacityNo
         )
-        .then((res) => {
+        .then(res => {
           this.tableData = res.data.data;
           this.getSpanArr(res.data.data);
+          this.operateShow = 0;
         });
     },
     //控制列自动撑开
@@ -1335,9 +1427,9 @@ export default {
       var that = this;
       that.$nextTick(() => {
         that.saleSteelKey = !that.saleSteelKey;
-      });    
+      });
     }
-  },
+  }
 };
 </script>
 
@@ -1350,6 +1442,11 @@ export default {
   .table {
     margin-left: 20px;
     margin-top: 20px;
+    ::-webkit-scrollbar {
+      // width: 20px;
+      height: 30px;
+      background-color: transparent;
+    }
   }
   .address {
     .button-box {

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