Explorar o código

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

zyf %!s(int64=2) %!d(string=hai) anos
pai
achega
da5cf20174

+ 2 - 2
build/utils.js

@@ -14,8 +14,8 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //    登录     合同                       首页       内转     排队   资源   销售                       零星物资
 // ['index','appoint','configManager','homepage',''inward,'queue','RMS','sale','serviceManager','SporadicManage'
 //       统计报表       组织机构/系统管理 采购  仓储
-//  'statisticalReport','systemConfig','TMS','WMS','workFlow']
-//let devModules = ["index", "statisticalReport", "appoint", "sale","AMS","TMS",'queue','WMS',"inward","RMS"];
+//  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
+//let devModules = ["index", "statisticalReport", "appoint", "sale"];
 let devModules = ['all']
 if (pathSrc.indexOf('node_modules') > -1) {
   devModules = require('../../../cors.js').devModules

+ 3 - 0
build/webpack.base.conf.js

@@ -115,6 +115,9 @@ module.exports = {
       }
     ]
   },
+  externals: {
+    './cptable': 'var cptable'
+  },
   node: {
     // prevent webpack from injecting useless setImmediate polyfill because Vue
     // source contains it (although only uses it if it's native).

+ 1 - 1
config/index.js

@@ -73,7 +73,7 @@ let proxyTable = {
   // 所有数据的请求域名地址
   '/api/v1': {
     target: 'http://172.16.33.166:80',
-    //target: 'http://localhost:8080',
+    // target: 'http://localhost:8080',
     // target: 'http://192.168.1.102:8080',
     ws: true,
     pathRewrite: {

+ 3 - 2
package.json

@@ -27,6 +27,7 @@
     "axios": "^0.26.1",
     "babel-polyfill": "^6.26.0",
     "bignumber.js": "^9.0.2",
+    "codemirror": "5.65.5",
     "crypto": "^1.0.1",
     "echarts": "^4.1.0",
     "el-cascader-multi": "^1.1.8",
@@ -71,8 +72,8 @@
     "x2js": "^3.3.0",
     "xe-utils": "^3.5.4",
     "xlsx": "^0.18.4",
-    "xterm": "3.12.0",
-    "codemirror": "5.65.5"
+    "xlsx-style": "^0.8.13",
+    "xterm": "3.12.0"
   },
   "devDependencies": {
     "@vue/test-utils": "^1.0.0-beta.24",

+ 4 - 0
src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.vue

@@ -64,6 +64,7 @@
         align="center"
         fixed="left"
         :resizable="false"
+        v-if="isShowGroup"
       >
         <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
       </el-table-column>
@@ -133,6 +134,9 @@ export default {
     comparison: {
       default: ''
     },
+    isShowGroup: {
+      default: true
+    },
     shiyHeigth: {
       default: null
     },

+ 88 - 88
src/views/RMS/components/addOtherCapacity.vue

@@ -36,8 +36,8 @@
 </template>
 
 <script>
-import PageTitle from "@/components/Page/Title";
-import { getCookie } from "@/utils/util.js";
+import PageTitle from '@/components/Page/Title'
+import { getCookie } from '@/utils/util.js'
 export default {
   components: { PageTitle },
   data() {
@@ -46,11 +46,11 @@ export default {
       form1: {},
       form1Initialization: {
         capacityTypeId: 1,
-        capacityNumber: "",
-        capacityCorlor: "黄",
-        capacityOwneris: "否",
-        capacityVip: "否",
-        capacityBlacklist: "否"
+        capacityNumber: '',
+        capacityCorlor: '黄',
+        capacityOwneris: '否',
+        capacityVip: '否',
+        capacityBlacklist: '否'
       },
       value: undefined,
       carrierIds: null,
@@ -61,101 +61,101 @@ export default {
       userCode: null,
       carrierUserId: null,
       carrierId: null
-    };
+    }
   },
   created() {
-    this.carrierUserId = getCookie("userId");
-    this.form1 = this.form1Initialization;
+    this.carrierUserId = getCookie('userId')
+    this.form1 = this.form1Initialization
     // console.log(this.carrierUserId, "carrierUserId");
   },
   mounted() {
     this.axios
       .post(
-        "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
+        '/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=' + this.carrierUserId
       )
       .then(res => {
-        if (res.data.code == "200") {
+        if (res.data.code == '200') {
           // console.log(res.data.data);
           if (res.data.data) {
-            this.state = res.data.data.carrierName;
-            this.carrierIds = res.data.data.carrierId;
+            this.state = res.data.data.carrierName
+            this.carrierIds = res.data.data.carrierId
           }
         }
-      });
+      })
   },
   methods: {
     //承运商弹出层
     handleSelect(item) {
-      this.carrierIds = item.carrierId;
-      item.carrierName = this.state;
+      this.carrierIds = item.carrierId
+      item.carrierName = this.state
     },
     //以下是承运商边输边查搜索
     querySearch(queryString, cb) {
       this.axios
-        .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+        .post('/api/v1/uc/getCarrierMesByLike?index=' + queryString)
         .then(res => {
-          if (res.data.code == "200") {
+          if (res.data.code == '200') {
             // console.log(res.data.data);
-            var restaurants = res.data.data;
+            var restaurants = res.data.data
             // console.log(restaurants, "restaurants");
             var results = queryString
               ? restaurants.filter(this.createFilter(queryString))
-              : restaurants;
+              : restaurants
             // 调用 callback 返回建议列表的数据
-            cb(results);
+            cb(results)
           }
-        });
+        })
     },
     createFilter(queryString) {
       return restaurants => {
         return (
           restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
           -1
-        );
-      };
+        )
+      }
     },
     //以上是承运商边输边查搜索
     deleteUser(userId) {
-      this.axios.delete("pass/v1/sysusers/" + userId).then(res => {
-        this.$message.error("添加失败,车牌可能重复");
-      });
+      this.axios.delete('pass/v1/sysusers/' + userId).then(res => {
+        this.$message.error('添加失败,车牌可能重复')
+      })
     },
     insertRole(userId, userCode) {
       this.axios
         .post(
-          "pass/v1/sysuserroles/addUserroles?userId=" +
+          'pass/v1/sysuserroles/addUserroles?userId=' +
             userId +
-            "&userCode=" +
+            '&userCode=' +
             userCode +
-            "&roleId=" +
-            "956144357092757504"
+            '&roleId=' +
+            '956144357092757504'
         )
         .then(res => {
-          if (res.code === "0") {
-            this.$message.success("操作成功");
-            this.saveLoading = false;
-            this.rolesTree.loading = false;
+          if (res.code === '0') {
+            this.$message.success('操作成功')
+            this.saveLoading = false
+            this.rolesTree.loading = false
           } else {
-            this.$message.error(res.message);
+            this.$message.error(res.message)
           }
-        });
+        })
     },
     makeSure() {
-      this.addLoading = true;
+      this.addLoading = true
       // if (!this.isVehicleNumber(this.form1.capacityNumber.toUpperCase())) {
       //   this.$message.error("车牌号格式不正确");
       //   this.addLoading = false;
       //   return;
       // }
-      if (this.form1.capacityNumber.length <= 2) {
-        this.$message.error("车牌号必须大于三位");
-        this.addLoading = false;
-        return;
+      if (this.form1.capacityNumber.length < 2) {
+        this.$message.error('车牌号必须大于三位')
+        this.addLoading = false
+        return
       }
       if (this.carrierIds == null) {
-        this.$message.error("请选择承运商");
-        this.addLoading = false;
-        return;
+        this.$message.error('请选择承运商')
+        this.addLoading = false
+        return
       }
       let RmsCapacity = {
         capacityTypeId: this.form1.capacityTypeId,
@@ -167,7 +167,7 @@ export default {
         remark: this.form1.remark,
         carrierId: this.carrierIds,
         state: this.state
-      };
+      }
       if (
         RmsCapacity.capacityNumber == null ||
         RmsCapacity.capacityCorlor == null ||
@@ -175,84 +175,84 @@ export default {
         RmsCapacity.capacityVip == null ||
         RmsCapacity.capacityBlacklist == null
       ) {
-        this.$message.error("存在空值!");
-        this.addLoading = false;
+        this.$message.error('存在空值!')
+        this.addLoading = false
       } else {
         //新增SSO运力账号
-        var formData = new FormData();
-        formData.append("userCode", this.form1.capacityNumber.toUpperCase());
-        formData.append("orgCode", "yunli");
-        formData.append("orgName", "运力");
-        formData.append("groupId", "506514577756917769");
-        formData.append("companyId", "713710108567277568");
-        formData.append("orgId", "924126716337721344");
+        var formData = new FormData()
+        formData.append('userCode', this.form1.capacityNumber.toUpperCase())
+        formData.append('orgCode', 'yunli')
+        formData.append('orgName', '运力')
+        formData.append('groupId', '506514577756917769')
+        formData.append('companyId', '713710108567277568')
+        formData.append('orgId', '924126716337721344')
         // console.log(formData.get("userCode"));
         // console.log(typeof formData);
         this.$store
-          .dispatch("system/usersManage/addUser", formData)
+          .dispatch('system/usersManage/addUser', formData)
           .then(res => {
             // console.log(res);
-            if (res.code === "0") {
+            if (res.code === '0') {
               // console.log(res.data.userId);
-              this.userId = res.data.userId;
-              this.userCode = res.data.userCode;
-              RmsCapacity.ssoId = res.data.userId;
+              this.userId = res.data.userId
+              this.userCode = res.data.userCode
+              RmsCapacity.ssoId = res.data.userId
               this.axios
-                .post("/api/v1/rms/insertCapacity", RmsCapacity)
+                .post('/api/v1/rms/insertCapacity', RmsCapacity)
                 .then(res => {
                   if (res.data.data == 1) {
-                    this.insertRole(this.userId, this.userCode);
-                    this.$message.success("添加成功");
-                    this.$router.push("capacity");
-                  } else if (res.data.code == "201") {
-                    this.deleteUser(this.userId);
+                    this.insertRole(this.userId, this.userCode)
+                    this.$message.success('添加成功')
+                    this.$router.push('capacity')
+                  } else if (res.data.code == '201') {
+                    this.deleteUser(this.userId)
                   } else {
-                    this.deleteUser(this.userId);
+                    this.deleteUser(this.userId)
                   }
-                });
+                })
             } else {
               // console.log(RmsCapacity, "RmsCapacity");
-              if (res.message == "账号已被注册") {
+              if (res.message == '账号已被注册') {
                 this.$confirm(
-                  "该账号已经被注册, 是否确定新增承运商绑定关系?",
-                  "提示",
+                  '该账号已经被注册, 是否确定新增承运商绑定关系?',
+                  '提示',
                   {
-                    confirmButtonText: "确定",
-                    cancelButtonText: "取消",
-                    type: "warning"
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
                   }
                 )
                   .then(() => {
                     this.axios
-                      .post("/api/v1/rms/insertCapacity", RmsCapacity)
+                      .post('/api/v1/rms/insertCapacity', RmsCapacity)
                       .then(res => {
                         // console.log(res, "res");
                         if (res.data.data == 0) {
-                          this.$message.success("新增承运商绑定关系成功!");
-                          this.$router.push("capacity");
+                          this.$message.success('新增承运商绑定关系成功!')
+                          this.$router.push('capacity')
                         } else {
-                          this.$message.error("该绑定关系已存在!");
+                          this.$message.error('该绑定关系已存在!')
                         }
-                      });
+                      })
                   })
                   .catch(() => {
                     this.$message({
-                      type: "info",
-                      message: "已取消删除"
-                    });
-                  });
+                      type: 'info',
+                      message: '已取消删除'
+                    })
+                  })
               }
             }
-          });
-        this.addLoading = false;
+          })
+        this.addLoading = false
       }
     },
     // 取消
     cancel() {
-      this.$router.go(-1);
+      this.$router.go(-1)
     }
   }
-};
+}
 </script>
 <style lang="scss">
 .addCapacity {

+ 2 - 0
src/views/TMS/components/bmsship/threeSectionFeeDetails.vue

@@ -51,6 +51,8 @@ export default {
       option: {
         // 表格请求数据的地址
         requestUrl: null,
+        isshowSummary:true,
+        showSummaryList:['resultInspectionFee','realWeight','resultWaterTonnage','planWeight']
       },
     };
   },

+ 16 - 8
src/views/TMS/components/importedShip/addLoadShip.vue

@@ -51,7 +51,7 @@
       </div>
     </div>
     <div class="button_box_addLoadShip">
-      <el-button type="primary" @click="makeSure">新增装船作业</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading">新增装船作业</el-button>
     </div>
   </div>
 </template>
@@ -70,6 +70,7 @@ export default {
       batchInfactoryId:"",
       restaurants: [],
       state: "",
+      isLoading:false,
       form: {
         waterUnitPrice:null,
       },
@@ -155,8 +156,10 @@ export default {
 
     // 新增
     makeSure() {
+      this.isLoading=true;
       if (JSON.stringify(this.rowMap).length == 2) {
         this.$message.error("未选择江船");
+        this.isLoading=false;
         return;
       }
       let mapVal = {
@@ -199,10 +202,15 @@ export default {
         mapVal.resultArrivalTime == null ||
         mapVal.resultOutWharyName == null ||
         mapVal.resultOutWharyTime == null
-      )
+      ){
         this.$message.error("存在空值!");
-      else if (!isNumber(val)) this.$message.warning("实装数量必须为数字!");
-      else
+         this.isLoading=false;
+      }
+      else if (!isNumber(val)) {
+        this.$message.warning("实装数量必须为数字!");
+        this.isLoading=false;
+      }
+      else{
         this.axios
           .post("/api/v1/tms/addLoadShip", {
             mapVal: mapVal,
@@ -220,10 +228,10 @@ export default {
             } else {
               this.$message.error("新增失败!");
             }
-            this.$refs["table"].resetField();
-          });
-
-
+            this.isLoading=false;
+          })
+      }
+      //
       // if (
       //   mapVal.resultActualInstallations == null ||
       //   // mapVal.portId==null||

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

@@ -135,7 +135,6 @@ export default {
       //       this.$message.error('该订单在金蝶已关闭,无法派车')
       //       return
       //     } else {
-
       //     }
       //   })
     },

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

@@ -103,7 +103,7 @@ export default {
       drawer: false,
       direction: "rtl",
       options: {
-        requestUrl: "/api/v1/tms/getBatchListForAttorney?apiId=375",
+        requestUrl: "/api/v1/tms/getBatchListForAttorney?apiId=383",
         selectionType: "radio",
         maplist: [],
       },

+ 307 - 149
src/views/inward/components/inwardBillet/addInwardBillet.vue

@@ -1,10 +1,10 @@
 // 新增内转钢坯需求
 <template>
   <div class="inwardRequirement">
-    <div>
-      <!-- 用车单位 -->
-      <div class="requireUnit form">
-        <el-form class="demo-form-inline" label-width="80px" :inline="true">
+    <!-- 用车单位 -->
+    <div class="requireUnit">
+      <el-form class="demo-form-inline" label-width="80px" :inline="true">
+        <div class="top1">
           <el-form-item label="用车单位" v-show="false">
             <el-input class="inline-input" v-model="requireUnitName" disabled>
             </el-input>
@@ -14,58 +14,87 @@
             </el-input>
           </el-form-item>
           <el-form-item label="炉号">
-            <el-input class="inline-input" v-model.number="heatNo"> </el-input>
-          </el-form-item>
-          <el-form-item label="支数">
-            <el-input class="inline-input" v-model="count"> </el-input>
+            <el-input
+              class="inline-input"
+              v-model.number="heatNo"
+              style="width:150px"
+            >
+            </el-input>
           </el-form-item>
-          <!-- 车辆我设为多选了,我觉得会省事,他们应该不希望每台车都做一次 -->
-          <el-form-item label="选择车辆">
-            <el-select class="inline-select" v-model="capacityIds" multiple>
+          <el-form-item label="选择钢种">
+            <el-select
+              class="inline-select"
+              v-model="type"
+              filterable
+              style="width:150px"
+            >
               <el-option
-                v-for="item in optionsCapacity"
-                :label="item.capacityNumber"
-                :value="item.capacityId"
-                :key="item.capacityId"
+                v-for="(item, index) in options1"
+                :key="index"
+                :label="item.value"
+                :value="item.value"
               >
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="选择班别">
-            <el-select class="inline-select" v-model="clazz">
+          <el-form-item label="选择规格">
+            <el-select
+              class="inline-select"
+              v-model="model"
+              filterable
+              style="width:150px"
+            >
               <el-option
-                v-for="item in options"
-                :key="item.value"
+                v-for="(item, index) in options2"
+                :key="index"
                 :label="item.value"
                 :value="item.value"
               >
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="选择钢种">
-            <el-select class="inline-select" v-model="type" filterable>
+          <el-form-item label="选择班别">
+            <el-select
+              class="inline-select"
+              v-model="clazz"
+              style="width:150px"
+            >
               <el-option
-                v-for="(item, index) in options1"
-                :key="index"
+                v-for="item in options"
+                :key="item.value"
                 :label="item.value"
                 :value="item.value"
               >
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="选择规格">
-            <el-select class="inline-select" v-model="model" filterable>
+        </div>
+        <div class="top3">
+          <el-form-item label="选择车辆">
+            <el-select
+              class="inline-select"
+              v-model="capacityId"
+              style="width:150px"
+            >
               <el-option
-                v-for="(item, index) in options2"
-                :key="index"
-                :label="item.value"
-                :value="item.value"
+                v-for="item in optionsCapacity"
+                :label="item.capacityNumber"
+                :value="item.capacityId"
+                :key="item.capacityId"
               >
               </el-option>
             </el-select>
           </el-form-item>
+          <el-form-item label="当车支数">
+            <el-input class="inline-input" v-model="count" style="width:150px">
+            </el-input>
+          </el-form-item>
           <el-form-item label="选择装货点" v-show="false">
-            <el-select class="inline-select" v-model="loadPoint">
+            <el-select
+              class="inline-select"
+              v-model="loadPoint"
+              style="width:150px"
+            >
               <el-option
                 v-for="item in optionsLoad"
                 :key="item.warehouseId"
@@ -76,7 +105,11 @@
             </el-select>
           </el-form-item>
           <el-form-item label="选择卸货点">
-            <el-select class="inline-select" v-model="unloadPoint">
+            <el-select
+              class="inline-select"
+              v-model="unloadPoint"
+              style="width:150px"
+            >
               <el-option
                 v-for="item in optionsUnload"
                 :key="item.warehouseId"
@@ -86,14 +119,80 @@
               </el-option>
             </el-select>
           </el-form-item>
-        </el-form>
+          <el-form-item label="选择班次">
+            <el-select
+              class="inline-select"
+              v-model="shift"
+              style="width:150px"
+            >
+              <el-option
+                v-for="item in optionShift"
+                :key="item.value"
+                :label="item.value"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </div>
+        <div class="button-box">
+          <el-switch
+            v-model="isMeter"
+            active-text="需要过磅"
+            inactive-text="不需要过磅"
+          >
+          </el-switch>
+          <el-button type="primary" @click="makeSure">保存</el-button>
+        </div>
+      </el-form>
+      <div class="checkBox">
+        <div class="checkTitle">
+          <span>抽取区</span>
+        </div>
+        <div class="checkArea">
+          <el-form class="demo-form-inline" label-width="80px" :inline="true">
+            <el-form-item label="炉号">
+              <el-input
+                class="inline-input"
+                v-model.number="checkHeatNo"
+                style="width:150px"
+              >
+              </el-input>
+            </el-form-item>
+            <el-form-item label="抽取支数">
+              <el-input
+                class="inline-input"
+                v-model.number.lazy="checkCount"
+                style="width:150px"
+              >
+              </el-input>
+            </el-form-item>
+            <el-form-item label="抽取重量">
+              <el-input
+                class="inline-input"
+                v-model.lazy="checkWeight"
+                style="width:150px"
+              >
+              </el-input>
+            </el-form-item>
+          </el-form>
+          <div class="checkButton">
+            <el-button type="primary" @click="checkBillet">抽取</el-button>
+          </div>
+        </div>
       </div>
     </div>
-    <div class="button-box">
-      <el-button type="primary" @click="makeSure">保存</el-button>
-    </div>
+
     <div>
-      <mergeRowTable v-bind.sync="first" ref="table"> </mergeRowTable>
+      <mergeRowTable v-bind.sync="first" ref="table" :isShowGroup="false">
+        <el-table-column label="操作" width="80px" fixed="right">
+          <template slot-scope="scope">
+            <el-button type="text" @click="deleteOrder(scope)" size="mini">
+              删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </mergeRowTable>
     </div>
   </div>
 </template>
@@ -107,6 +206,9 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      checkWeight: null,
+      checkCount: null,
+      checkHeatNo: null,
       requireUnitId: null,
       requireUnitName: null,
       heatNo: null,
@@ -119,6 +221,18 @@ export default {
       loadPoint: null,
       unloadPoint: null,
       count: null,
+      shift: null,
+      optionShift: [
+        {
+          value: '早'
+        },
+        {
+          value: '中'
+        },
+        {
+          value: '夜'
+        }
+      ],
       options: [
         {
           value: '甲'
@@ -195,7 +309,8 @@ export default {
       first: {
         // first请求数据的地址
         requestUrl: ''
-      }
+      },
+      isMeter: '需要过磅'
     }
   },
   mounted() {
@@ -204,6 +319,29 @@ export default {
     this.getUnloadPoint()
     this.getCapacity()
   },
+  watch: {
+    heatNo() {
+      this.checkHeatNo = this.heatNo
+    },
+    checkHeatNo() {
+      this.heatNo = this.checkHeatNo
+    },
+    count() {
+      this.computeWeight()
+    },
+    singleWeight() {
+      this.computeWeight()
+    },
+    checkCount() {
+      if (
+        !(this.checkCount < 7 && this.checkCount > 3) &&
+        isNumber(this.checkCount)
+      ) {
+        this.$message.error('抽取支数不能大于7支小于4支')
+        this.checkCount = null
+      }
+    }
+  },
   created() {
     if (
       getCookie('orgCode') == 'dagangadmin' ||
@@ -217,6 +355,86 @@ export default {
     }
   },
   methods: {
+    getRequestUrl() {
+      if (
+        getCookie('orgCode') == 'dagangadmin' ||
+        getCookie('orgCode') == 'zidonghuabu'
+      ) {
+        this.first.requestUrl =
+          '/api/v1/ams/getBilletRequirementList?apiId=518&i=' + new Date()
+      } else {
+        this.first.requestUrl =
+          '/api/v1/ams/getBilletRequirementList?apiId=518&orgCode=' +
+          getCookie('orgCode') +
+          '&i=' +
+          new Date()
+      }
+    },
+    deleteOrder(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: '已取消删除'
+          })
+        })
+    },
+    checkBillet() {
+      if (this.checkWeight && this.checkCount && this.checkHeatNo) {
+        if (this.checkWeight > 25 || this.checkWeight < 8) {
+          this.$message.error('抽取重量不能大于25t或者小于8t')
+          this.checkWeight = null
+          return
+        } else {
+          let map = {
+            checkWeight: this.checkWeight,
+            checkCount: this.checkCount,
+            checkHeatNo: this.checkHeatNo,
+            orgCode: getCookie('orgCode')
+          }
+          this.axios.post('/api/v1/ams/checkBillet', map).then(res => {
+            if (res.data.code == 200) {
+              this.$message.success('抽取成功')
+              this.getRequestUrl()
+              this.checkWeight = null
+              this.checkCount = null
+              this.checkHeatNo = null
+            } else if (res.data.code == '201') {
+              this.$message.error('该炉号已抽取,不能重复抽取')
+              this.checkWeight = null
+              this.checkCount = null
+              this.checkHeatNo = null
+            } else {
+              this.$message.error('抽取失败,请联系管理员')
+            }
+          })
+        }
+      }
+    },
     resetCapacity() {
       this.getCapacity()
     },
@@ -284,23 +502,24 @@ export default {
     // 新增
     makeSure() {
       let capacityList = []
-      this.capacityIds.forEach(e => {
-        let map = {}
-        map.capacityId = e
-        capacityList.push(map)
-      })
+      let e = {
+        capacityId: this.capacityId
+      }
+      capacityList.push(e)
       let map = {
         requirementShipperId: this.requireUnitId,
         heatNo: this.heatNo,
         requirementType: '计重',
         clazz: this.clazz,
+        shift: this.shift,
         type: this.type,
         model: this.model,
         requirementPlatformId: this.loadPoint,
         requirementUnloadUnitId: this.unloadPoint,
         capacityList: capacityList,
         count: this.count,
-        orgCode: getCookie('orgCode')
+        orgCode: getCookie('orgCode'),
+        isMeter: this.isMeter
       }
       console.log('map:', map)
       if (
@@ -329,87 +548,19 @@ export default {
       this.axios.post('/api/v1/ams/addBilletRequirement', map).then(res => {
         if (res.data.code == '200') {
           this.$message.success('派发成功!')
+          this.getRequestUrl()
         }
       })
-    },
-    // 返回
-    cancel() {
-      this.$router.go(-1)
     }
   }
 }
 </script>
 <style lang="scss" scoped>
 .inwardRequirement {
-  .from {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    margin-top: 5px;
-    margin-bottom: 20px;
-  }
-  .drawSty {
-    .el-input {
-      width: 240px;
-    }
-  }
-  .DueTime {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    margin-top: 5px;
-    margin-bottom: 20px;
-    .chooseDueTime {
-      margin-right: 70px;
-    }
-  }
-  .capacity {
-    display: flex;
-    text-align: center;
-    align-items: center;
-    justify-content: center;
-    margin-top: 2rem;
-    margin-bottom: 1.25rem;
-    margin-right: 10px;
-  }
-  .materialDrawer {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    .el-input {
-      width: 320px;
-    }
-    .el-select {
-      width: 320px;
-    }
-    .el-autocomplete {
-      width: 320px;
-    }
-    .el-form {
-      padding: 10px;
-    }
-    .truckBtn {
-      width: 320px;
-    }
-  }
-  .swtichTop {
-    display: flex;
-    height: 40px;
-    align-content: center;
-    justify-content: center;
-    padding-right: 20px;
-    .titile {
-      color: red;
-      font-size: 14px;
-    }
-    .switch {
-      margin-right: -30px;
-    }
-  }
   .requireUnit {
     display: flex;
-    justify-content: center;
-    align-items: center;
+    justify-content: start;
+    align-items: flex-start;
     margin-top: 20px;
     .text {
       display: inline-block;
@@ -420,47 +571,54 @@ export default {
         margin-right: 90px;
       }
     }
-  }
-  .form-box {
-    display: flex;
-    text-align: center;
-    align-items: center;
-    justify-content: center;
-    margin-top: 20px;
-    margin-bottom: 20px;
-    margin-left: 10px;
-    ::v-deep .el-form {
+    .top1 {
+      margin-right: 100px;
+    }
+    .top4 {
       display: flex;
       justify-content: center;
       align-items: center;
-      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;
-          }
+      margin-top: 20px;
+      margin-bottom: 10px;
+    }
+    .checkBox {
+      height: 250px;
+      width: 300px;
+      background-color: aqua;
+      border-radius: 20px;
+      margin-bottom: 20px;
+      .checkTitle {
+        border: 1px solid #ffff;
+        font-size: 20px;
+        height: 40px;
+        font-weight: 600;
+        line-height: 40px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-bottom: 5px;
+      }
+      .checkArea {
+        // display: flex;
+        // justify-content: center;
+        // align-items: center;
+        .checkButton {
+          display: flex;
+          justify-content: center;
+          align-items: flex-start;
         }
       }
     }
-  }
-  .button-box {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    margin-top: 20px;
-    margin-right: 90px;
+    .button-box {
+      margin-top: 20px;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      .el-button {
+        margin-top: 20px;
+      }
+    }
   }
 }
 </style>

+ 42 - 33
src/views/inward/components/truckAppoint/addRequirement2.vue

@@ -127,7 +127,7 @@
           <el-form-item label="运输单价"> </el-form-item>
           <el-form-item>
             <el-button type="primary" @click="onprice" class="truckBtn"
-            >浏览</el-button
+              >浏览</el-button
             >
           </el-form-item>
         </el-form>
@@ -256,7 +256,12 @@
           :show-close="false"
           :before-close="handleClose2"
         >
-          <el-input placeholder="请输入内容" v-model="inputMaterial" style="width: 240px" clearable>
+          <el-input
+            placeholder="请输入内容"
+            v-model="inputMaterial"
+            style="width: 240px"
+            clearable
+          >
           </el-input
           ><el-button type="primary" class="btn" @click="onclickMaterial">
             <i class="el-icon-search"></i>查询
@@ -328,11 +333,13 @@
           size="40%"
         >
           <div class="selectText">
-            <el-input v-model="inputP" placeholder="请输入内容" style="width: 240px"></el-input>
-            <el-button
-              type="primary"
-              @click="onpriceSelect"
-            ><i class="el-icon-search"></i>查询</el-button
+            <el-input
+              v-model="inputP"
+              placeholder="请输入内容"
+              style="width: 240px"
+            ></el-input>
+            <el-button type="primary" @click="onpriceSelect"
+              ><i class="el-icon-search"></i>查询</el-button
             >
           </div>
           <div class="LineTable">
@@ -376,19 +383,19 @@ export default {
         bar: {
           hoverStyle: true,
           onlyShowBarOnScroll: false, //是否只有滚动的时候才显示滚动条
-          background: "#5f9ea0", //滚动条颜色
+          background: '#5f9ea0', //滚动条颜色
           opacity: 0.8, //滚动条透明度
-          "overflow-x": "hidden"
+          'overflow-x': 'hidden'
         }
       },
-      PriceDrawer:false,
+      PriceDrawer: false,
       tableLoading: false,
-      isKuang:false,
+      isKuang: false,
       priceOptions: {
-        requestUrl: ""
+        requestUrl: ''
       },
-      inputP:"",
-      drawerP:false,
+      inputP: '',
+      drawerP: false,
       //--
       aaadrawer: false,
       disabled: false,
@@ -565,24 +572,25 @@ export default {
     }
   },
   methods: {
-    funcP(){
-      this.isKuang = false;
-      this.tableLoading = false;
+    funcP() {
+      this.isKuang = false
+      this.tableLoading = false
     },
-    onpriceSelect(){
+    onpriceSelect() {
       if (this.inputP == null) {
         this.priceOptions.requestUrl =
-          "/api/v1/ams/getInwardContractPrice?apiId=464&deleted=0&i=" + new Date();
+          '/api/v1/ams/getInwardContractPrice?apiId=464&deleted=0&i=' +
+          new Date()
       } else {
         this.priceOptions.requestUrl =
-          "/api/v1/ams/getInwardContractPrice?apiId=464&deleted=0&con=" +
-          this.inputP;
+          '/api/v1/ams/getInwardContractPrice?apiId=464&deleted=0&con=' +
+          this.inputP
       }
     },
-    onprice(){
-      this.drawerP=true;
+    onprice() {
+      this.drawerP = true
       this.priceOptions.requestUrl =
-        "/api/v1/ams/getInwardContractPrice?apiId=464&deleted=0&i=" + new Date();
+        '/api/v1/ams/getInwardContractPrice?apiId=464&deleted=0&i=' + new Date()
     },
     //用车单位弹出层
     handleSelectCarrier(item) {
@@ -887,7 +895,7 @@ export default {
       // console.log("进来了");
       // console.log(this.whether);
       // console.log(this.installremark);
-      if (this.capacityTypeName == null || this.capacityTypeName == "") {
+      if (this.capacityTypeName == null || this.capacityTypeName == '') {
         this.$message.warning('车辆类型必填')
         this.disabled = false
         return
@@ -971,7 +979,7 @@ export default {
           DueTime = sjTime(this.DueTime)
         }
       }
-      if (this.capacityTypeName == null || this.capacityTypeName == "") {
+      if (this.capacityTypeName == null || this.capacityTypeName == '') {
         this.$message.warning('车辆类型必填')
         this.disabled = false
         return
@@ -984,12 +992,12 @@ export default {
       }
       if (this.DueTime == null && this.isOpenDueTime == false) {
         //默认选择明天0点
-        var dd = new Date(this.form.requirementTruckTime);
-        dd.setDate(dd.getDate() + 1);//获取AddDayCount天后的日期
-        dd.setHours(null);
-        dd.setMinutes(null);
-        dd.setSeconds(null);
-        DueTime = sjTime(dd);
+        var dd = new Date(this.form.requirementTruckTime)
+        dd.setDate(dd.getDate() + 1) //获取AddDayCount天后的日期
+        dd.setHours(null)
+        dd.setMinutes(null)
+        dd.setSeconds(null)
+        DueTime = sjTime(dd)
       }
       let requiremnet = {
         requirementEstimatedDuration: this.form.requirementEstimatedDuration,
@@ -1010,7 +1018,8 @@ export default {
         capacityTypeId: this.capacityTypeId,
         mapList: this.tableData,
         orgCode: getCookie('orgCode'),
-        remark: this.form.Tel + this.capacityTypeName + this.form.typeRemarks
+        remark:
+          this.form.Tel + '-' + this.capacityTypeName + this.form.typeRemarks
       }
       this.axios
         .post('/api/v1/ams/addTruckRequirement', requiremnet)

+ 10 - 6
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -191,7 +191,11 @@
             max-height="500px"
           >
             <el-table-column type="selection" width="55"></el-table-column>
-            <el-table-column width="80" align="center" prop="Nosort"></el-table-column>
+            <el-table-column
+              width="80"
+              align="center"
+              prop="Nosort"
+            ></el-table-column>
             <el-table-column prop="capacityNumber" label="车牌号" fit>
             </el-table-column>
             <el-table-column prop="resultStartTime" label="排队开始时间">
@@ -492,10 +496,10 @@ export default {
 
       // 表格序号
       let Nosort = 0
-      for(let n in this.spanArr){
-        if(this.spanArr[n]>0){
+      for (let n in this.spanArr) {
+        if (this.spanArr[n] > 0) {
           Nosort += 1
-          this.$set(data[n],'Nosort',Nosort)
+          this.$set(data[n], 'Nosort', Nosort)
         }
       }
     },
@@ -636,8 +640,8 @@ export default {
           value => value.materialPriority === this.maplist[i].id
         )
         console.log('warehouse', warehouse)
-        if (warehouse && warehouse.carQueue >= 10) {
-          this.$message.error('该仓库已经有10辆车在排队,不允许放行!')
+        if (warehouse && warehouse.carQueue >= 20) {
+          this.$message.error('该仓库已经有20辆车在排队,不允许放行!')
           return
         }
         this.filterArr(this.maplist[i].resultId)

+ 0 - 1
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckSteelDetails.vue

@@ -391,7 +391,6 @@ export default {
       this.originalAddress = row.realAddress
       this.originalPriceValue = row.priceValue
       this.detailsId = row.detailsId
-
       this.Address.requestUrl =
         '/api/v1/ams/getAddressDeliveryAddress?apiId=511&i=' + new Date()
       this.dialogFormVisible = true

+ 18 - 9
src/views/statisticalReport/components/Ship_dynamic_table.vue

@@ -27,6 +27,7 @@
 <script>
 import tableItem from "./tableItem";
 import FileSaver from "file-saver";
+import XLSXStyle from 'xlsx-style'
 export default {
   name: "TableView",
   components: {
@@ -180,15 +181,18 @@ export default {
           }
         });
     },
+    bta(s) {
+      var buf = new ArrayBuffer(s.length);
+      var view = new Uint8Array(buf);
+      for (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;
+      return buf;
+    },
     getExcel(tableTitle) {
         //let tables = this.$refs.ship;//此处是拿表格document元素,也可以取父div的ref
         let tables = document.getElementById("pdfDom");
         let table_book = XLSX.utils.table_to_book(tables);
         console.log("table_book:",table_book);
         console.log("sheet:",table_book.Sheets.Sheet1);
-        table_book.Sheets.Sheet1=this.appendOne(table_book.Sheets.Sheet1,this.downStockString);
-        table_book.Sheets.Sheet1=this.appendOne(table_book.Sheets.Sheet1,this.stockString);
-        table_book.Sheets.Sheet1=this.appendOne(table_book.Sheets.Sheet1,this.runStockString);
         //这里遍历单元格给单元格对象设置属性,s为控制样式的属性
         Object.keys(table_book.Sheets.Sheet1).forEach((key) => {
           if (key.indexOf('!') < 0) {
@@ -198,19 +202,24 @@ export default {
                 vertical: 'center',//竖直居中
                 wrapText: true,//自动换行
               },
+              border: { // 设置边框
+                  top: { style: 'thin' },
+                  bottom: { style: 'thin' },
+                  left: { style: 'thin' },
+                  right: { style: 'thin' }
+              }
             }
           }
        })
        console.log("sheet:",table_book.Sheets.Sheet1);
         //导出
-        var table_write = XLSX.write(table_book, {
-            bookType: "xlsx",
-            bookSST: true,
-            type: "array"
-        });
+        let table_write = XLSXStyle.write(table_book, {
+        type: 'binary',
+        bookType: 'xlsx',
+        })
         try {
             FileSaver.saveAs(
-                new Blob([table_write], { type: "application/octet-stream" }),
+                new Blob([this.bta(table_write)], { type: "application/octet-stream" }),
                 tableTitle+".xlsx"
             );
         } catch (e) {

+ 12 - 3
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -269,6 +269,7 @@
         </el-table-column>
         <el-table-column
           prop="outGateTime"
+          column-key="outGateTimeList"
           label="出厂时间"
           width="130px"
           show-overflow-tooltip
@@ -570,7 +571,8 @@
             </div>
             <div class="steelMapClass44">
               <el-button type="success" circle @click="continue1"
-              >继续装</el-button>
+                >继续装</el-button
+              >
             </div>
           </div>
           <div class="steelMapClass5">
@@ -1384,7 +1386,11 @@ export default {
     },
     //以下是车牌号边输边查搜索
     querySearch(queryString, cb) {
-      if (queryString != null && queryString != '' && queryString.length > 3) {
+      console.log(queryString)
+      if (
+        (queryString != null && queryString != '' && queryString.length > 3) ||
+        queryString == '取消'
+      ) {
         this.axios
           .post('/api/v1/uc/getCapacityByLike?index=' + queryString)
           .then(res => {
@@ -1427,7 +1433,10 @@ export default {
         this.$message.warning('请先注册车牌号或者选中弹出后再提交!')
         return
       }
-      if (!isVehicleNumber(this.steelMap.capacityNo)) {
+      if (
+        !isVehicleNumber(this.steelMap.capacityNo) &&
+        this.steelMap.capacityNo != '取消'
+      ) {
         this.$message.error('请输入正确格式的车牌号!')
         return
       }

+ 1116 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/unloadingSteelReports.vue

@@ -0,0 +1,1116 @@
+//钢材统计报表
+<template>
+  <div class="purchasFuelNewMonitor">
+    <div class="tableTop">
+      <el-form :inline="true" style="margin-top :5px">
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="请选择需筛选的内容"
+            clearable
+            @change="changeScreen"
+            style="width:100px"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            style="width:170px"
+            v-model="input"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen1"
+            placeholder="请选择需筛选的内容"
+            clearable
+            style="width:100px"
+          >
+            <el-option
+              v-for="item in options1"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            style="width:170px"
+            v-model="input1"
+            placeholder="请输入查询条件"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="exportAllReportToExcel"
+            >下载Excel</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="addSaleOrder"
+            >重新生成计划</el-button
+          >
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="refresh">
+            <i class="el-icon-refresh"></i>
+          </el-button>
+        </el-form-item>
+        <el-form-item>
+          <span style="margin-left: 1rem;font-size:16px">车数/件数:</span>
+          <span style="font-size:16px"
+            >{{ totalCapacity }}/{{ totalNumber }}</span
+          >
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="table">
+      <el-table
+        :data="tableData"
+        :span-method="objectSpanMethod"
+        ref="tableRef"
+        border
+        style="width: 100%; margin-top: 20px"
+        :max-height="maxHeight"
+        :height="maxHeight"
+        @filter-change="filterChange"
+        @selection-change="handleSelectionChange"
+        :lazy="true"
+      >
+        <el-table-column
+          type="selection"
+          width="50"
+          align="center"
+          fixed="left"
+        >
+        </el-table-column>
+        <el-table-column
+          width="50"
+          label="序号"
+          align="center"
+          :resizable="false"
+        >
+          <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+        </el-table-column>
+        <el-table-column
+          prop="orderTime"
+          label="订单日期"
+          width="110px"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="saleOrderStatus"
+          label="销售订单状态"
+          width="100px"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="consigneeName"
+          label="客户"
+          width="160px"
+          align="center"
+          column-key="consigneeName"
+          :filters="filterConsigneeList"
+          sortable
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="areaName"
+          label="销售片区"
+          width="150px"
+          align="center"
+          column-key="saleAreaList"
+          :filters="filterSaleAreaList"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="closeEntryId"
+          label="金蝶分录ID"
+          width="150px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="entryStatus"
+          label="分录状态"
+          width="100px"
+          show-overflow-tooltip
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="saleRemark"
+          label="摘要"
+          width="150px"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="carrierName"
+          label="承运商"
+          align="center"
+          width="80px"
+          column-key="carrierList"
+          sortable
+          show-overflow-tooltip
+          :filters="filterCarrierList"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="capacityNo"
+          column-key="capacityNo"
+          label="车牌号"
+          align="center"
+          width="90px"
+          sortable
+          show-overflow-tooltip
+          :filters="filterCapacityList"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialName"
+          column-key="materialNameList"
+          label="物资名称"
+          align="center"
+          width="150px"
+          sortable
+          :filters="filtermaterialNameList"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialSpe"
+          label="物资规格"
+          align="center"
+          sortable
+          width="120px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="materialNum"
+          label="物资件数"
+          align="center"
+          width="50px"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="addressPlace"
+          label="收货地址"
+          width="250px"
+          sortable
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="orderStatus"
+          label="运单状态"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="entryGateTime"
+          label="进厂时间"
+          width="130px"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="tareWeightTime"
+          label="皮重时间"
+          width="130px"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column prop="tareWeight" label="皮重" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column
+          prop="loadTime"
+          label="装货时间"
+          width="130px"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="grossWeightTime"
+          label="毛重时间"
+          width="130px"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column prop="grossWeight" label="毛重" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column prop="netWeight" label="净重" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column
+          prop="orderNo"
+          label="运输订单号"
+          width="180px"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="capacityTel"
+          label="司机电话"
+          width="120px"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="saler"
+          label="业务员"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="shipperName"
+          label="发货单位"
+          width="170px"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="consigneeTel"
+          label="收货客户电话"
+          width="120px"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column prop="isSelfMention" label="是否自提" align="center">
+        </el-table-column>
+        <el-table-column
+          prop="saleOrderNo"
+          label="销售订单号"
+          width="200px"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+import { sjTime, isVehicleNumber } from '@/utils/sharedJsFile'
+import { getCookie } from '@/utils/util.js'
+export default {
+  data() {
+    return {
+      carNumber: '',
+      //弹出框
+      centerDialogVisible: false,
+      //根据车序号查询的值
+      steelMap: {},
+      //钢材子表数据
+      steelList: [],
+      drawer: false,
+      isShow3: false,
+      isShow4: false,
+      input: null,
+      screen: '',
+      screen1: '',
+      options: [
+        {
+          value: '客户',
+          lable: '客户'
+        },
+        {
+          value: '承运商',
+          lable: '承运商'
+        },
+        {
+          value: '车牌号',
+          lable: '车牌号'
+        },
+        {
+          value: '分录ID',
+          lable: '分录ID'
+        }
+      ],
+      options1: [
+        {
+          value: '客户',
+          lable: '客户'
+        },
+        {
+          value: '承运商',
+          lable: '承运商'
+        },
+        {
+          value: '车牌号',
+          lable: '车牌号'
+        }
+      ],
+      startTime: null,
+      endTime: null,
+      //合计净重
+      totalNumber: 0,
+      //合计车数
+      totalCapacity: 0,
+      tableTitle: '销售统计报表',
+      capacityList: [],
+      carrierList: [],
+      tableData: [],
+      //筛选条件1(客户)
+      filters1: [],
+      spanArr: [],
+      pos: 0,
+      //需要合并列的名称
+      mergeList: [
+        '序号',
+        '整车操作',
+        '销售订单状态',
+        '销售订单号',
+        '发货单位',
+        '司机电话',
+        '运输订单号',
+        '签收地址',
+        '签收时间',
+        '抵达地址',
+        '抵达时间',
+        '出厂时间',
+        '进厂时间',
+        '运单状态',
+        '车牌号',
+        '承运商',
+        '客户',
+        '收货地址',
+        '业务员',
+        '送货单打印',
+        '收货客户电话',
+        '是否自提',
+        '订单日期',
+        '短信发送',
+        '销售片区',
+        '抵达时间',
+        '签收时间'
+      ],
+      //钢材多拼车辆线路ID
+      //索引从1-10为1-10拼路线ID
+      lineSpelling: [
+        0,
+        110001,
+        110002,
+        110003,
+        110004,
+        110005,
+        110006,
+        110007,
+        110008,
+        110009,
+        110010
+      ],
+      tableTitle: '销售钢材统计报表',
+      //所有省
+      provinceList: [],
+      //选中的省
+      province: '',
+      //所有市
+      cityList: [],
+      //选中的市
+      city: '',
+      //所有的县(区)
+      countyList: [],
+      //选中的县
+      county: '',
+      //地址输入框的值
+      addresText: '',
+      //已选中省市县
+      address: null,
+      //具体地址
+      place: null,
+      //暂存具体地址
+      place1: null,
+      //省市县Id
+      addressId: null,
+      addressRow: {},
+      input1: '',
+      maxHeight: window.innerHeight - 140,
+      tableRowIndex: '',
+      isRowClick: 0,
+      orgCodeList: [
+        'wuliuyunshubu',
+        'dagangadmin',
+        'shichangxinxibu',
+        'xiaoshouyewuyuan',
+        'zidonghuabu'
+      ],
+      isShowOperate: false,
+      filterConsigneeList: [],
+      filterCarrierList: [],
+      filterCapacityList: [],
+      filtermaterialNameList: [],
+      filterSaleAreaList: [],
+      filterMap: {},
+      //销售订单主表数据
+      saleOrderList: [
+        'receiveName',
+        'isSelfMention',
+        'saleRemark',
+        'saleOrderReceiveCustomer',
+        'salerName',
+        'saleOrderNo',
+        'saleArea'
+      ],
+      saleOrderMapList: [
+        'orderNo',
+        'truckNo',
+        'province',
+        'district',
+        'town',
+        'truckRemark',
+        'place',
+        'saleOrderConsigneeTel',
+        'saleDateOfReceipt',
+        'materialName',
+        'materialSpecification',
+        'materialModel',
+        'materialNumber',
+        'steelMeters',
+        'isPoundSale'
+      ],
+      saleDateOfReceipt: null
+    }
+  },
+  created() {
+    let loadTime1 = new Date(
+      new Date(new Date().toLocaleDateString()).getTime() +
+        (3600 * 1000 * 8 - 1)
+    ) // 当天8点前
+    let loadTime2 = new Date(
+      new Date(new Date().toLocaleDateString()).getTime() +
+        (3600 * 1000 * 32 - 1)
+    ) // 次天8点前
+    if (new Date().getTime() - loadTime1 > 0) {
+      this.saleDateOfReceipt = loadTime2
+    } else {
+      this.saleDateOfReceipt = loadTime1
+    }
+    this.getSteelReport()
+  },
+  watch: {
+    tableData: {
+      handler(oldVal, newVal) {
+        this.filterListChange()
+        this.toggleSelection(newVal)
+      },
+      deep: true,
+      immediate: true
+    }
+  },
+  computed: {},
+  mounted() {
+    this.$nextTick(() => {
+      window.onresize = () => {
+        return (() => {
+          this.maxHeight = window.innerHeight - 150
+        })()
+      }
+    })
+  },
+  activated() {
+    this.maxHeight = window.innerHeight - 150
+  },
+  computed: {},
+  methods: {
+    toggleSelection() {
+      this.$nextTick(() => {
+        this.$refs.tableRef.toggleAllSelection()
+      })
+    },
+    handleSelectionChange() {},
+    //记录每一行的合并数
+    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].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
+            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
+          }
+        }
+        this.totalCapacity = data[data.length - 1].group + 1
+        this.totalNumber = data.reduce(function(prev, item) {
+          return prev + item.materialNum
+        }, 0)
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.mergeList.indexOf(column.label) != -1) {
+        const _row = this.spanArr[rowIndex]
+        const _col = _row > 0 ? 1 : 0
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      }
+    },
+    addSaleOrder() {
+      const loading = this.$loading({
+        lock: true,
+        text: '正在快马加鞭为您生成上传销售订单,请稍候',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      let closeEntryList = []
+      this.$refs.tableRef.selection.forEach(e => {
+        let map = {}
+        e.saleRemark = `${this.getRemarkDate()}${e.areaName},直发${
+          e.addressDistrict
+        }`
+        map.saleMaterialId = e.saleMaterialId
+        map.closeEntryId = e.closeEntryId
+        map.number = e.saleOrderNo
+        closeEntryList.push(map)
+      })
+      const map1 = this.$refs.tableRef.selection.reduce((result, item) => {
+        result[item.saleOrderNo] = result[item.saleOrderNo] || []
+        result[item.saleOrderNo].push(item)
+        return result
+      }, {})
+      let result = Object.values(map1)
+      //遍历数组
+      let saleOrderListMap = []
+      console.log(result)
+      result.forEach((saleOrderList, index) => {
+        let map = {}
+        let arr = []
+        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
+        map.isUploadEas = 1
+        saleOrderListMap.push(map)
+      })
+      this.axios
+        .post('/api/v1/ams/addSteelSaleOrderList', saleOrderListMap)
+        .then(res => {
+          if (res.data.code == '200') {
+            loading.close()
+            this.getSteelReport()
+            this.$message.success('新增上传销售订单成功!')
+            this.tableData = []
+          } else {
+            this.$message.error(res.data.data)
+            this.getSteelReport()
+            loading.close()
+            this.tableData = []
+          }
+        })
+        .catch(e => {
+          this.$message.error('生成错误!')
+          loading.close()
+          this.tableData = []
+        })
+      const loadings = this.$loading({
+        lock: true,
+        text: '正在关闭上一个分录,请稍候',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      this.axios
+        .post('/api/v1/ams/closingEntries', closeEntryList)
+        .then(res => {
+          if (res.data.code == '200') {
+            loadings.close()
+            this.$message.success('关闭成功')
+          } else {
+            this.$message.error('关闭失败')
+            this.getSteelReport()
+            loadings.close()
+          }
+        })
+        .catch(e => {
+          this.$message.error('关闭错误!')
+          loadings.close()
+        })
+    },
+    getRemarkDate() {
+      let day = new Date().getDate()
+      let month = new Date().getMonth() + 1
+      console.log(day)
+      if (day < 10) {
+        day = '0' + day
+      }
+      return `${month}.${day}`
+    },
+    //继续装
+    //筛选
+    filterChange(obj) {
+      if (typeof obj.carrierList != 'undefined' && obj.carrierList.length > 0) {
+        this.filterMap.carrierList = obj.carrierList
+      }
+      if (
+        typeof obj.carrierList != 'undefined' &&
+        obj.carrierList.length == 0
+      ) {
+        delete this.filterMap.carrierList
+      }
+      if (
+        typeof obj.materialNameList != 'undefined' &&
+        obj.materialNameList.length > 0
+      ) {
+        this.filterMap.materialNameList = obj.materialNameList
+      }
+      if (
+        typeof obj.materialNameList != 'undefined' &&
+        obj.materialNameList.length == 0
+      ) {
+        delete this.filterMap.materialNameList
+      }
+      if (typeof obj.capacityNo != 'undefined' && obj.capacityNo.length > 0) {
+        this.filterMap.capacityList = obj.capacityNo
+      }
+      if (typeof obj.capacityNo != 'undefined' && obj.capacityNo.length == 0) {
+        delete this.filterMap.capacityList
+      }
+      if (
+        typeof obj.consigneeName != 'undefined' &&
+        obj.consigneeName.length > 0
+      ) {
+        this.filterMap.consigneeNameList = obj.consigneeName
+      }
+      if (
+        typeof obj.consigneeName != 'undefined' &&
+        obj.consigneeName.length == 0
+      ) {
+        delete this.filterMap.consigneeNameList
+      }
+      if (
+        typeof obj.saleAreaList != 'undefined' &&
+        obj.saleAreaList.length > 0
+      ) {
+        this.filterMap.saleAreaList = obj.saleAreaList
+      }
+      if (
+        typeof obj.saleAreaList != 'undefined' &&
+        obj.saleAreaList.length == 0
+      ) {
+        delete this.filterMap.saleAreaList
+      }
+      // if (obj)
+      this.onclick(this.filterMap)
+    },
+    //控制筛选数组变化
+    filterListChange() {
+      let consigneeNameList = this.tableData.map(e => {
+        return e.consigneeName
+      })
+      let carrierNameList = this.tableData.map(e => {
+        return e.carrierName
+      })
+      let capacityList = this.tableData.map(e => {
+        return e.capacityNo
+      })
+      let materialNameList = this.tableData
+        .map(e => {
+          return e.materialName
+        })
+        .filter(e => {
+          return e != null
+        })
+      let saleAreaList = this.tableData
+        .map(e => {
+          return e.areaName
+        })
+        .filter(e => {
+          return e != null
+        })
+      this.filterConsigneeList = []
+      this.filterCarrierList = []
+      this.filterCapacityList = []
+      this.filtermaterialNameList = []
+      this.filterSaleAreaList = []
+      Array.from(new Set(consigneeNameList)).forEach(e => {
+        let map = {}
+        map.text = e
+        map.value = e
+        this.filterConsigneeList.push(map)
+      })
+      Array.from(new Set(carrierNameList)).forEach(e => {
+        let map = {}
+        map.text = e
+        map.value = e
+        this.filterCarrierList.push(map)
+      })
+      Array.from(new Set(capacityList)).forEach(e => {
+        let map = {}
+        map.text = e
+        map.value = e
+        this.filterCapacityList.push(map)
+      })
+      Array.from(new Set(materialNameList)).forEach(e => {
+        let map = {}
+        map.text = e
+        map.value = e
+        this.filtermaterialNameList.push(map)
+      })
+      Array.from(new Set(saleAreaList)).forEach(e => {
+        let map = {}
+        map.text = e
+        map.value = e
+        this.filterSaleAreaList.push(map)
+      })
+    },
+    //筛选
+    //筛选客户
+    //点击操作弹出框
+    //销售钢材报表导出excel
+    exportAllReportToExcel() {
+      const loading = this.$loading({
+        lock: true,
+        text: '正在导出Excel',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      var title = this.tableTitle
+      let tHeader = []
+      let filterVal = []
+      console.log(this.$refs.tableRef)
+      this.$refs.tableRef.$children.forEach(item => {
+        if (item.label != undefined && item.prop != undefined) {
+          if (tHeader.indexOf(item.label) === -1) {
+            tHeader.push(item.label)
+          }
+          if (filterVal.indexOf(item.prop) === -1) {
+            filterVal.push(item.prop)
+          }
+        }
+      })
+      this.downloadLoading = true
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require('@/assets/excel/Export2Excel.js') //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        let data = this.tableData.map(v => filterVal.map(j => v[j])) //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title) // (title)导出的表格名称
+      })
+      loading.close()
+    },
+    changeScreen() {},
+    //承运商弹出层
+    //查询,输入查询条件
+    onclick(obj) {
+      this.isRowClick = 0
+      const loading = this.$loading({
+        lock: true,
+        text: '正在获取数据',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      let startTime = null
+      let endTime = null
+      let carrierSsoId = null
+      let carrierName = null
+      let consigneeName = null
+      let capacityNo = null
+      let remark = null
+      let saler = null
+      let easPrimaryId = 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 if (this.screen == '分录ID') {
+        easPrimaryId = this.input
+      } else {
+        remark = this.input
+      }
+      if (this.screen1 == '客户') {
+        consigneeName = this.input1
+      } else if (this.screen1 == '承运商') {
+        carrierName = this.input1
+      } else if (this.screen1 == '车牌号') {
+        capacityNo = this.input1
+      } else {
+        remark = this.input1
+      }
+      this.axios
+        .post(
+          '/api/v1/tms/loadingSaleSteelReport?startTime=' +
+            startTime +
+            '&endTime=' +
+            endTime +
+            '&carrierSsoId=' +
+            carrierSsoId +
+            '&i=' +
+            new Date() +
+            '&remark=' +
+            remark +
+            '&consigneeName=' +
+            consigneeName +
+            '&carrierName=' +
+            carrierName +
+            '&capacityNo=' +
+            capacityNo +
+            '&saler=' +
+            saler +
+            '&easPrimaryId=' +
+            easPrimaryId,
+          obj
+        )
+        .then(res => {
+          this.tableData = res.data.data
+          this.filters1 = res.data.data.consigneeName
+          console.log('客户数据')
+          console.log(res.data.data.consigneeName)
+          this.getSpanArr(res.data.data)
+          loading.close()
+        })
+    },
+    //重新获取表格数据
+    refresh() {
+      this.getSteelReport()
+    },
+    //获取钢材统计报表
+    getSteelReport() {
+      this.isRowClick = 0
+      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 (this.screen1 == '下单客户') {
+        consigneeName = this.input1
+      } else if (this.screen == '承运商') {
+        carrierName = this.input1
+      } else if (this.screen == '车牌号') {
+        capacityNo = this.input1
+      } else {
+        remark = this.input1
+      }
+      if (getCookie('orgCode') == 'chengyunshang') {
+        carrierSsoId = getCookie('userId')
+      }
+      if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
+        saler = getCookie('loginName')
+      }
+      this.axios
+        .post(
+          '/api/v1/tms/loadingSaleSteelReport?startTime=' +
+            startTime +
+            '&endTime=' +
+            endTime +
+            '&carrierSsoId=' +
+            carrierSsoId +
+            '&saler=' +
+            saler +
+            '&i=' +
+            new Date() +
+            '&remark=' +
+            remark +
+            '&consigneeName=' +
+            consigneeName +
+            '&carrierName=' +
+            carrierName +
+            '&capacityNo=' +
+            capacityNo
+        )
+        .then(res => {
+          this.tableData = res.data.data
+          this.getSpanArr(res.data.data)
+        })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.purchasFuelNewMonitor {
+  .tableTop {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+    .el-tooltip {
+      width: auto !important;
+    }
+    ::-webkit-scrollbar {
+      // width: 20px;
+      height: 20px;
+      background-color: transparent;
+    }
+  }
+  .dialog {
+    .steelMapClass {
+      .steelMapClass1 {
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass12 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+      }
+      .steelMapClass2 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass22 {
+          margin-left: 50px;
+          margin-right: 10px;
+          .el-select {
+            .el-input .el-input--suffix {
+              .el-input__inner {
+                border: 0px solid !important;
+              }
+            }
+          }
+        }
+      }
+      .steelMapClass3 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass32 {
+          margin-left: 50px;
+          // margin-right: 10px;
+        }
+        .steelMapClass33 {
+          margin-left: 20px;
+          // margin-right: 10px;
+        }
+      }
+      .steelMapClass4 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+
+        .steelMapClass42 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+        .steelMapClass43 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+        .steelMapClass44 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+      }
+      .steelMapClass5 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+
+        .steelMapClass52 {
+          margin-left: 50px;
+          margin-right: 10px;
+          .steelMapClass521 {
+            margin-left: 20px;
+          }
+        }
+      }
+      .steelMapClass6 {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass62 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+      }
+    }
+  }
+  .address {
+    .button-box {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
+  }
+}
+</style>

+ 294 - 25
src/views/statisticalReport/components/tableItem.vue

@@ -1,5 +1,10 @@
 <template>
   <div>
+     <table v-show="false">
+          <tr>
+            <td colspan="22">达州钢铁每日船舶动态明细表</td>
+          </tr>
+        </table>
     <el-table
       :show-summary="isShowSum"
       :data="tableData"
@@ -28,7 +33,7 @@
           <span class="empty-desc">暂无数据</span>
         </div>
       </template>
-      <div slot="append">
+      <div slot="append" style="width: 100%">
         <div class="appendSlot" style="margin-top:20px">
           <span
             v-for="item in downStockStringArr"
@@ -55,6 +60,189 @@
             >{{ item.value }}</span
           >
         </div>
+        <el-divider></el-divider>
+        <!-- 库存表 -->
+        <table v-show="false">
+          <tr>
+            <td colspan="22">{{downStockString}}</td>
+          </tr>
+          <tr>
+            <td colspan="22">{{stockString}}</td>
+          </tr>
+          <tr>
+            <td colspan="22">{{runStockString}}</td>
+          </tr>
+          <tr>
+            <td colspan="22"></td>
+          </tr>
+        </table>
+        <!-- 万州港装车数据 -->
+        <div class="appendSlot">
+             <el-table
+          ref="loadTable"
+          highlight-current-row
+          border
+          show-summary
+          :data="loadTable"
+          :span-method="objectSpanMethod1"
+          :row-style="{height:'40px'}"
+          style="font-size: 18px">
+          <el-table-column label="万州港发货信息">
+          <el-table-column
+          align="center"
+            prop="materialName"
+            width="200px"
+            label="物资名">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="resultForeignShipName"
+            width="200px"
+            label="船号">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="num"
+            width="200px"
+            label="装车量">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="time"
+            width="200px"
+            label="时间">
+          </el-table-column>
+          <el-table-column
+            width="200px"
+            label="备注">
+          </el-table-column>
+          </el-table-column>
+          <el-table-column label="进口矿水联运情况简报">
+             <el-table-column>
+            </el-table-column>
+            <el-table-column>
+            </el-table-column>
+            <el-table-column>
+            </el-table-column>
+            <el-table-column>
+            </el-table-column>
+          </el-table-column>
+        </el-table>
+        </div >
+        <el-divider></el-divider>
+        <!-- 等闸线 -->
+        <div class="appendSlot">
+             <el-table
+          highlight-current-row
+          border
+          :data="controlLinesTable"
+          :row-style="{height:'40px'}"
+          style="font-size: 12px">
+          <el-table-column label="控制线等闸船舶动态">
+          <!-- 4 -->
+          <el-table-column
+          align="center"
+            prop="lineDate4"
+            width="100px"
+            label="日期">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="up4"
+            width="80px"
+            label="上行等闸数">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="down4"
+            width="80px"
+            label="下行等闸数">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="count4"
+            width="80px"
+            label="总计">
+          </el-table-column>
+          <!-- 3 -->
+          <el-table-column
+          align="center"
+            prop="lineDate3"
+            width="100px"
+            label="日期">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="up3"
+            width="80px"
+            label="上行等闸数">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="down3"
+            width="80px"
+            label="下行等闸数">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="count3"
+            width="80px"
+            label="总计">
+          </el-table-column>
+          <!-- 2 -->
+          <el-table-column
+          align="center"
+            prop="lineDate2"
+            width="100px"
+            label="日期">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="up2"
+            width="80px"
+            label="上行等闸数">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="down2"
+            width="80px"
+            label="下行等闸数">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="count2"
+            width="80px"
+            label="总计">
+          </el-table-column>
+          <!-- 1 -->
+          <el-table-column
+          align="center"
+            prop="lineDate1"
+            width="100px"
+            label="日期">
+          </el-table-column>
+          <el-table-column
+          align="center"
+            prop="up1"
+            width="80px"
+            label="上行等闸数">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="down1"
+            width="80px"
+            label="下行等闸数">
+          </el-table-column>
+           <el-table-column
+          align="center"
+            prop="count1"
+            width="80px"
+            label="总计">
+          </el-table-column>
+
+          </el-table-column>
+        </el-table>
+        </div >
       </div>
     </el-table>
   </div>
@@ -105,13 +293,18 @@ export default {
       runStockString:null,
       stockStringArr: [],
       downStockStringArr: [],
-      runStockStringArr:[]
+      runStockStringArr:[],
+      spanArr:[],
+      loadTable:[],
+      controlLinesTable:[]
     };
   },
   mounted() {
     this.getStockString();
     this.getDownStockString();
     this.getRunStockList();
+    this.searchLoadData();
+    this.getControlLines();
   },
   methods: {
     getStockString() {
@@ -137,10 +330,10 @@ export default {
             let materialName = res.data.data.list[0].materialName;
             this.stockStringArr.push({
               class: "black",
-              value: materialName + res.data.data.list[0].totalTonnage + "吨:"
+              value: materialName +' '+ res.data.data.list[0].totalTonnage + "吨:"
             });
             this.stockString +=
-              materialName + res.data.data.list[0].totalTonnage + "吨 ";
+              materialName +' '+ res.data.data.list[0].totalTonnage + "吨 ";
 
             res.data.data.list.forEach(e => {
               if (e.materialName == materialName) {
@@ -154,10 +347,10 @@ export default {
               } else {
                 materialName = e.materialName;
                 this.stockString +=
-                  materialName + res.data.data.list[0].totalTonnage + "吨 ";
+                  materialName +' '+ res.data.data.list[0].totalTonnage + "吨 ";
                 this.stockString +=
                   ";" +
-                  materialName +
+                  materialName +' '+
                   e.totalTonnage +
                   "吨:" +
                   " “" +
@@ -167,7 +360,7 @@ export default {
                   "吨 ";
                 this.stockStringArr.push({
                   class: "black",
-                  value: ";" + materialName + e.totalTonnage + "吨:"
+                  value: ";" + materialName +' ' + e.totalTonnage + "吨:"
                 });
                 this.stockString +=
                   ";" +
@@ -187,6 +380,10 @@ export default {
               }
             });
             console.log("arr:", this.stockStringArr);
+            this.stockString='';
+            this.stockStringArr.forEach((item)=>{
+              this.stockString+=item.value;
+            });
           }
         });
     },
@@ -211,7 +408,7 @@ export default {
             let materialName = res.data.data[0].materialName;
             this.downStockStringArr.push({
               class: "black",
-              value: materialName + res.data.data[0].totalTonnage + "吨:"
+              value: materialName + ' ' + res.data.data[0].totalTonnage + "吨:"
             });
 
             res.data.data.forEach(e => {
@@ -225,7 +422,7 @@ export default {
                 materialName = e.materialName;
                 this.downStockStringArr.push({
                   class: "black",
-                  value: ";" + materialName + e.totalTonnage + "吨:"
+                  value: ";" + materialName + ' ' + e.totalTonnage + "吨:"
                 });
                 this.downStockStringArr.push({
                   class: "normal",
@@ -237,7 +434,7 @@ export default {
             console.log("arr:", this.downStockStringArr);
             this.downStockString='';
             this.downStockStringArr.forEach((item)=>{
-              downStockString+=item.value;
+              this.downStockString+=item.value;
             });
           }
         });
@@ -263,33 +460,33 @@ export default {
             let materialName = res.data.data[0].materialName;
             this.runStockStringArr.push({
               class: "black",
-              value: materialName + res.data.data[0].totalTonnage + "吨:"
+              value: materialName +' ' + res.data.data[0].totalTonnage + "吨:"
             });
 
             res.data.data.forEach(e => {
               if (e.materialName == materialName) {
-                this.runStockStringArr.push({
-                  class: "normal",
-                  value:
-                    " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 "
-                });
+                // this.runStockStringArr.push({
+                //   class: "normal",
+                //   value:
+                //     " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 "
+                // });
               } else {
                 materialName = e.materialName;
                 this.runStockStringArr.push({
                   class: "black",
-                  value: ";" + materialName + e.totalTonnage + "吨:"
-                });
-                this.runStockStringArr.push({
-                  class: "normal",
-                  value:
-                    " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 "
+                  value: ";" + materialName +' '+ e.totalTonnage + "吨"
                 });
+                // this.runStockStringArr.push({
+                //   class: "normal",
+                //   value:
+                //     " “" + e.resultForeignShipName + "”" + e.gmTonnage + "吨 "
+                // });
               }
             });
             console.log("arr:", this.runStockStringArr);
             this.runStockString='';
             this.runStockStringArr.forEach((item)=>{
-              runStockString+=item.value;
+              this.runStockString+=item.value;
             });
           }
         });
@@ -389,7 +586,79 @@ export default {
           colspan: 17
         };
       }
-    }
+    },
+    //查询装车数据
+    searchLoadData(){
+      let map={
+
+      };
+      this.axios.post('/api/v1/tms/getLoadData',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,
+          });
+        }
+      })
+    },
+    //处理数据,得到合并数组
+    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;
+                }
+            }
+        }
+    },
+    objectSpanMethod1({ 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(rowIndex===0 && columnIndex === 3){
+           return {
+                rowspan: this.loadTable.length,
+                colspan: 1
+            };
+        }
+    },
+    //查询控制线数据
+    getControlLines(){
+      let map={
+        year:new Date().getFullYear(),
+        month:new Date().getMonth()+1
+      };
+      this.axios.post('/api/v1/tms/getControlLinesTable',map).then((res)=>{
+        if(res.data.code == "200"){
+          this.controlLinesTable=res.data.data;
+        }else {
+          this.$message({
+              type: "error", 
+              message: res.data.data,
+          });
+        }
+      })
+    },
   }
 };
 </script>
@@ -406,7 +675,7 @@ export default {
 <style lang="scss" scoped>
 .el-table {
   .appendSlot {
-    margin-left: 10%;
+    margin-left: 5%;
     font-size: 18px;
     line-height: 20px;
     .normalFirst {

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

@@ -39,6 +39,10 @@ import wagonWorkReport from '../components/wanzhouReport/wagonWorkReport.vue'
 import saleSteelCarrierReport from '@/views/statisticalReport/components/salesLogisticsStatistics/saleSteelCarrierReport'
 import saleSteelReports from '@/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports'
 import mapTest from '../components/salesLogisticsStatistics/mapTest.vue'
+const unloadingSteelReports = () =>
+  import(
+    '@/views/statisticalReport/components/salesLogisticsStatistics/unloadingSteelReports.vue'
+  )
 Vue.use(Router)
 
 const constantRouterMap = [
@@ -260,6 +264,14 @@ const constantRouterMap = [
           code: 'xtpzgl-yhgl'
         },
         component: mapTest
+      },
+      {
+        path: 'unloadingSteelReports',
+        name: 'unloadingSteelReports',
+        meta: {
+          code: 'xtpzgl-yhgl'
+        },
+        component: unloadingSteelReports
       }
     ]
   }