Browse Source

提交代码

zengyf 2 years ago
parent
commit
3f3a80a468

+ 2 - 2
build/utils.js

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

+ 2 - 2
config/index.js

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

+ 48 - 46
src/components/main.vue

@@ -341,7 +341,11 @@
                 >通知信息</el-button
               >
             </el-badge>
-            <div class="Web_Notice" v-show="socketshow" style="z-index: 1 ; overflow-y: scroll">
+            <div
+              class="Web_Notice"
+              v-show="socketshow"
+              style="z-index: 1 ; overflow-y: scroll"
+            >
               <div class="workspace_row-grid_mytask">
                 <div
                   class="workspace_message"
@@ -660,24 +664,20 @@
     </el-dialog>
 
     <!--通知弹窗-->
-    <el-dialog
-      :visible.sync="centerDialogVisible"
-    >
+    <el-dialog :visible.sync="centerDialogVisible">
       <div style="margin-left: 30px; font-size: 20px">
-        <h1>{{noticedata1.noticetitle}}</h1>
+        <h1>{{ noticedata1.noticetitle }}</h1>
       </div>
       <div style="height: 20px"></div>
       <div style="margin-left: 30px">
-        <i class="el-icon-document"></i>{{noticedata1.noticecontent}}
+        <i class="el-icon-document"></i>{{ noticedata1.noticecontent }}
       </div>
       <el-divider></el-divider>
       <div style="margin-left: 30px">
         <i class="el-icon-user-solid"></i>
-        {{noticedata1.insertusername}}
-      </div>
-      <div style="margin-left: 30px">
-        <i></i>{{noticedata1.inserttime}}
+        {{ noticedata1.insertusername }}
       </div>
+      <div style="margin-left: 30px"><i></i>{{ noticedata1.inserttime }}</div>
       <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="makeSure">确 定</el-button>
       </span>
@@ -763,7 +763,7 @@ export default {
       }
     }
     return {
-      centerDialogVisible:false,
+      centerDialogVisible: false,
       badgeshow: '',
       dutyName: '',
       regular: '', // 密码策略校验正则表达式
@@ -939,13 +939,13 @@ export default {
       taskAllNum: '', //任务数目
       socketshow: false, //通知框的显示
       orgcodezs: '', //cookie中的orgcode
-      userId: '',//cookie中的userId
-      noticedata:[],
+      userId: '', //cookie中的userId
+      noticedata: [],
       noticedata1: {
-        noticeTitle:'ceshi',
-        noticecontent:'ceshi',
-        insertusername:'ceshi',
-        inserttime:'ceshi'
+        noticeTitle: 'ceshi',
+        noticecontent: 'ceshi',
+        insertusername: 'ceshi',
+        inserttime: 'ceshi'
       },
       allowed: []
     }
@@ -1154,22 +1154,25 @@ export default {
   },
   methods: {
     //弹框删除
-    async makeSure(){
-      let noticeid=this.noticedata1.noticeid
+    async makeSure() {
+      let noticeid = this.noticedata1.noticeid
       console.log(this.noticedata1)
-      this.noticedata1=[] ;
-      this.centerDialogVisible=false;
-      await this.axios.post("/api/v1/ams/updateNoticeStatus",
-        {userId:this.userId,
-        noticeId:noticeid}).then((res)=>{
+      this.noticedata1 = []
+      this.centerDialogVisible = false
+      await this.axios
+        .post('/api/v1/ams/updateNoticeStatus', {
+          userId: this.userId,
+          noticeId: noticeid
+        })
+        .then(res => {
           console.log(res.data)
-          if (res.data.data ===0){
-            this.badgeshow=true;
-          }else {
+          if (res.data.data === 0) {
+            this.badgeshow = true
+          } else {
             console.log('进入了小红点标记区')
-            this.taskAllNum=res.data.data;
+            this.taskAllNum = res.data.data
           }
-      })
+        })
     },
     // 判断是否为公司其他平台模块且处于开发模式
     isDev(url) {
@@ -2650,8 +2653,7 @@ export default {
     getinformation() {
       console.log('获取到的userId----------------' + this.userId)
       this.axios
-        .post('/api/v1/ams/getNotice',
-          { userId: this.userId})
+        .post('/api/v1/ams/getNotice', { userId: this.userId })
         .then(res => {
           this.noticedata = res.data.data
           this.taskAllNum = res.data.data[0].taskAllNum
@@ -2676,26 +2678,25 @@ export default {
                 this.centerDialogVisible=true;
               }
             }
-          }else {
-            console.log("进入了标记值为null的值")
-            this.taskAllNum=null
+          } else {
+            console.log('进入了标记值为null的值')
+            this.taskAllNum = null
           }
-
         })
     },
     // 查看待办任务详情
     seeTaskContent(item) {
-      console.log("点击后的事件")
+      console.log('点击后的事件')
       console.log(item)
-      let data={
-        noticetitle:item.noticetitle,
-        noticecontent:item.noticecontent,
-        insertusername:item.insertusername,
-        inserttime:item.inserttime,
-        noticeid:item.noticeId
+      let data = {
+        noticetitle: item.noticetitle,
+        noticecontent: item.noticecontent,
+        insertusername: item.insertusername,
+        inserttime: item.inserttime,
+        noticeid: item.noticeId
       }
-      this.noticedata1=data
-      this.centerDialogVisible=true;
+      this.noticedata1 = data
+      this.centerDialogVisible = true
       console.log(this.noticedata1)
       console.log(this.centerDialogVisible)
       console.log(this.noticedata1.noticetitle)
@@ -2831,8 +2832,9 @@ export default {
   overflow: auto;
   ::-webkit-scrollbar {
     //滚动条宽高,如果不需要显示滚动条可设置宽高为0
-    width: 0px;
-    // height: 0px;
+
+    width: 10px;
+    height: 10px;
   }
   ::-webkit-scrollbar-thumb {
     //滚动条颜色和圆角

+ 12 - 12
src/config/include.js

@@ -1,20 +1,20 @@
 /* eslint-disable */
 /**************************************************************** 通用引入,包含element-ui等 ***********************************************************************************/
-import Vue from 'vue';
-import ElementUI from 'element-ui';
-import 'element-ui/lib/theme-chalk/index.css'; // 2.4.2
+import Vue from 'vue'
+import ElementUI from 'element-ui'
+import 'element-ui/lib/theme-chalk/index.css' // 2.4.2
 
 /**************************************************************** 引入babel-polyfill转换es6 ***********************************************************************************/
-import 'babel-polyfill';
+import 'babel-polyfill'
 
 /**************************************************************** import 全局filter         ***********************************************************************************/
-import '@/utils/filter.js';
+import '@/utils/filter.js'
 
 /**************************************************************** import 全局方法           ***********************************************************************************/
-import '@/utils/method.js';
+import '@/utils/method.js'
 
 /**************************************************************** import 公共方法           ***********************************************************************************/
-import '@/utils/commonFunction.js';
+import '@/utils/commonFunction.js'
 
 /**************************************************************** 引入外部插件              ***********************************************************************************/
 import VueClipboard from 'vue-clipboard2'
@@ -23,14 +23,14 @@ import jsPlumb from 'jsplumb'
 
 import icorePlugin from 'icore-sdk/icore/index.js' // icore-sdk
 
-window.jsPlumb = jsPlumb.jsPlumb;
+window.jsPlumb = jsPlumb.jsPlumb
 
 Vue.use(VueClipboard)
 
 // use element-ui 2.4.2
-Vue.use(ElementUI);
-Vue.use(icorePlugin);
+Vue.use(ElementUI)
+//console.log('----------------------fffff')
+Vue.use(icorePlugin)
 
 /**************************************************************** 引入项目公用样式 简直覆盖Element-ui css ***********************************************************************/
-import '@/assets/css/index.css';
-
+import '@/assets/css/index.css'

+ 57 - 53
src/views/TMS/components/importedShip/addUnloadShip.vue

@@ -18,135 +18,139 @@
       </div>
     </div>
     <div class="button_box">
-      <el-button type="primary" :loading="isLoading" @click="makeSure">新增卸船作业</el-button>
+      <el-button type="primary" :loading="isLoading" @click="makeSure"
+        >新增卸船作业</el-button
+      >
     </div>
   </div>
 </template>
 
 <script>
-import PageTitle from "@/components/Page/Title";
-import { sjTime } from "@/utils/sharedJsFile";
+import PageTitle from '@/components/Page/Title'
+import { sjTime } from '@/utils/sharedJsFile'
+import { getCookie } from '@/utils/util.js'
 export default {
   components: { PageTitle },
   data() {
     return {
-      input: "",
-      isLoading:false,
+      input: '',
+      isLoading: false,
       restaurants: [],
-      state: "",
+      state: '',
       form: {},
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getCapacityList?apiId=138",
+        requestUrl: '/api/v1/tms/getCapacityList?apiId=138',
         // 控制显示当选列
-        selectionType: "radio"
+        selectionType: 'radio'
       },
       unloadMap: {}
-    };
+    }
   },
   computed: {
     a1() {
-      return this.form.resultEndTime;
+      return this.form.resultEndTime
     }
   },
   watch: {
     a1() {
-      this.unloadShipMes();
+      this.unloadShipMes()
     }
   },
   methods: {
     unloadShipMes() {
       if (
-        typeof this.form.resultStartTime == "undefined" ||
+        typeof this.form.resultStartTime == 'undefined' ||
         this.form.resultStartTime == null ||
-        this.form.resultStartTime == "null" ||
-        this.form.resultStartTime == "undefined"
+        this.form.resultStartTime == 'null' ||
+        this.form.resultStartTime == 'undefined'
       ) {
-        this.$message.warning("请先填写卸船开始时间!");
-        this.form.resultEndTime = null;
+        this.$message.warning('请先填写卸船开始时间!')
+        this.form.resultEndTime = null
       }
-      return;
+      return
     },
     currentRadioChange(row) {
-      this.unloadMap = {};
-      this.unloadMap = row;
-      console.log(row);
+      this.unloadMap = {}
+      this.unloadMap = row
+      console.log(row)
     },
     onclick() {
       this.option.requestUrl =
-        "/api/v1/tms/getCapacityList?apiId=138&con=" + this.input;
+        '/api/v1/tms/getCapacityList?apiId=138&con=' + this.input
     },
     // 新增
     makeSure() {
-      this.isLoading=true;
-      console.log(this.unloadMap);
+      this.isLoading = true
+      console.log(this.unloadMap)
       if (JSON.stringify(this.unloadMap).length == 2) {
-        this.$message.error("请先选择卸船的船只!");
-        this.isLoading=false;
-        return;
+        this.$message.error('请先选择卸船的船只!')
+        this.isLoading = false
+        return
       }
       if (
         this.form.resultEndTime != null &&
-        this.form.resultEndTime != "undefined" &&
-        typeof this.form.resultEndTime != "undefined" &&
-        this.form.resultEndTime != "null"
+        this.form.resultEndTime != 'undefined' &&
+        typeof this.form.resultEndTime != 'undefined' &&
+        this.form.resultEndTime != 'null'
       ) {
-        this.unloadShipMes();
+        this.unloadShipMes()
       }
-      let resultArrivalDate = null;
-      let resultStartTime = null;
-      let resultEndTime = null;
+      let resultArrivalDate = null
+      let resultStartTime = null
+      let resultEndTime = null
       if (
-        typeof this.form.resultArrivalDate != "undefined" &&
+        typeof this.form.resultArrivalDate != 'undefined' &&
         this.form.resultArrivalDate != null
       ) {
-        resultArrivalDate = sjTime(this.form.resultArrivalDate);
+        resultArrivalDate = sjTime(this.form.resultArrivalDate)
       }
       if (
-        typeof this.form.resultStartTime != "undefined" &&
+        typeof this.form.resultStartTime != 'undefined' &&
         this.form.resultStartTime != null
       ) {
-        resultStartTime = sjTime(this.form.resultStartTime);
+        resultStartTime = sjTime(this.form.resultStartTime)
       }
       if (
-        typeof this.form.resultEndTime != "undefined" &&
+        typeof this.form.resultEndTime != 'undefined' &&
         this.form.resultEndTime != null
       ) {
-        resultEndTime = sjTime(this.form.resultEndTime);
+        resultEndTime = sjTime(this.form.resultEndTime)
       }
       let mapVal = {
         resultArrivalDate: resultArrivalDate,
         resultStartTime: resultStartTime,
         resultEndTime: resultEndTime,
         resultStatus: this.form.resultStatus
-      };
+      }
       this.axios
-        .post("/api/v1/tms/addUnLoadShip", {
+        .post('/api/v1/tms/addUnLoadShip', {
           mapVal: mapVal,
-          unloadMap: this.unloadMap
+          unloadMap: this.unloadMap,
+          userId: getCookie('userId')
         })
         .then(res => {
           if (res.data.code == 200) {
             this.$message({
-              type: "success",
-              message: "新增成功!"
-            });
+              type: 'success',
+              message: '新增成功!'
+            })
             // this.$refs.table.refreshData();
-            this.$router.go(-1);
+            this.$router.go(-1)
           } else {
-            this.$message.error("新增失败!");
+            this.$message.error('新增失败!')
           }
-          this.isLoading=false;
-        });
+          this.isLoading = false
+        })
     },
     loadAll() {
-      return [];
+      return []
     },
     handleSelect(item) {
-      console.log(item);
+      console.log(item)
     }
   }
-};
+}
 </script>
 <style lang="scss">
 .shipTransport {
@@ -186,7 +190,7 @@ export default {
   }
   .button_box {
     margin-left: 45%;
-    width:160px;
+    width: 160px;
   }
 }
 </style>

+ 11 - 27
src/views/TMS/components/importedShip/shipLocation.vue

@@ -13,7 +13,7 @@
         <i class="el-icon-refresh"></i>刷新
       </el-button>
     </div>
-    <el-table :data="selectionList" border highlight-current-row>
+    <el-table :data="selectionList" border highlight-current-row fit>
       <el-table-column type="index" width="50" label="序号" align="center">
       </el-table-column>
       <el-table-column
@@ -31,9 +31,6 @@
         <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">
@@ -49,6 +46,7 @@
             <template v-if="item.prop == 'locationStatus'">
               <el-select
                 v-model.number="scope.row.locationStatus"
+                @change="click(scope.row)"
                 placeholder="请选择"
               >
                 <el-option
@@ -60,15 +58,7 @@
                 </el-option>
               </el-select>
             </template>
-            <!-- 日期 -->
-            <template v-if="item.prop == 'locationRouteTime'">
-              <el-date-picker
-                type="date"
-                v-model.number="scope.row.locationRouteTime"
-                style="width: 150px"
-                :clearable="false"
-              ></el-date-picker>
-            </template>
+           
           </template>
 
           <template v-else>
@@ -77,13 +67,6 @@
         </template>
       </el-table-column>
 
-      <el-table-column fixed="right" label="操作" width="60">
-        <template slot-scope="scope">
-          <el-button @click="click(scope.row)" type="text" size="small"
-            >保存</el-button
-          >
-        </template>
-      </el-table-column>
     </el-table>
   </div>
 </template>
@@ -134,8 +117,7 @@ export default {
         {
           prop: "locationRouteTime",
           label: "离港日期",
-          width: "200",
-          slot: true,
+          width: "100",
         },
         {
           prop: "startPortName",
@@ -173,7 +155,6 @@ export default {
         {
           prop: "locationMemo",
           label: "备注",
-          width: "140",
         },
       ],
       selectionList: [],
@@ -188,16 +169,19 @@ export default {
   },
   methods: {
     onblur(scope) {
-      // console.log("我是交了");
-      // console.log(scope);
       this.axios
         .post(
           "/api/v1/tms/getShipLocationStatus?shipLocation=" +
             scope.row.shipLocation
         )
         .then((res) => {
-          // console.log(res.data.data);
-          scope.row.locationStatus = res.data.data.locationStatus;
+          console.log("locationStatus:",res.data.data);
+          try {
+            scope.row.locationStatus = res.data.data.locationStatus;
+          } catch (error) {
+            
+          }
+          this.click(scope.row);
         });
     },
     initialization() {

+ 1 - 1
src/views/WMS/components/port_deposit/loadPortStock.vue

@@ -116,7 +116,7 @@ export default {
       option: {
         // 表格请求数据的地址
         requestUrl: "/api/v1/wmsh/getLoadPortStockList?apiId=158",
-        comparison:"materialName",
+        comparison:"type",
         columnIndexs:[0,1,2]
       },
       option2: {

+ 6 - 2
src/views/appoint/components/ship/addDeliveryAttorney.vue

@@ -103,7 +103,7 @@ export default {
       drawer: false,
       direction: "rtl",
       options: {
-        requestUrl: "/api/v1/tms/getBatchListForAttorney?apiId=383",
+        requestUrl: "/api/v1/tms/getBatchListForAttorney?apiId=375",
         selectionType: "radio",
         maplist: [],
       },
@@ -124,9 +124,13 @@ export default {
     },
   },
   created() {
+    let attorneyTime = new Date();
+    attorneyTime.setHours(0);
+    attorneyTime.setMinutes(0);
+    attorneyTime.setSeconds(0);
     this.form1 = {
       downSwimPortId: 11,
-      attorneyTime: new Date(),
+      attorneyTime: attorneyTime,
     };
   },
   mounted() {

+ 18 - 1
src/views/appoint/components/ship/addDeliveryNotice.vue

@@ -69,6 +69,21 @@
           ref="from1"
           @change="onchange"
         ></dil-form>
+        <el-form>
+          <div class="preview-group">
+            <el-form-item label="备注:">
+              <el-select v-model="form1.resultMemo" placeholder="必选" filterable>
+                <el-option
+                  v-for="resultMemo in resultMemos"
+                  :key="resultMemo"
+                  :label="resultMemo"
+                  :value="resultMemo"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </div>
+        </el-form>
       </div>
       <!-- <div class="liulan">
         <el-button type="primary" class="btn" @click="ondrawer(4)">浏览</el-button>
@@ -217,6 +232,7 @@ export default {
   data() {
     return {
       isLoading: false,
+      resultMemos:['低富粉','中富粉','高富粉','机精粉','进口块矿'],
       a: 1,
       cargoPictureUrl: "",
       shippingCertificate: "",
@@ -513,7 +529,8 @@ export default {
         map.groupId == null ||
         map.isNeedPortDisCharge == null ||
         map.isNeedPortFee == null ||
-        map.isNeedBonded == null
+        map.isNeedBonded == null ||
+        map.resultMemo == null
       ) {
         this.$message.error("存在空值!");
         this.isLoading = false;

+ 170 - 58
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -184,13 +184,13 @@
         <el-tab-pane label="两拼车辆排队链表" name="fourth">
           <el-table
             :data="tableData2"
-            :span-method="objectSpanMethod"
+            :span-method="objectSpanMethod1"
             border
             style="width: 100%; margin-top: 20px"
-            @selection-change="handleSelectionChange"
+            @selection-change="handleSelectionChangeSpelling"
             :row-key="getRowKey"
             max-height="500px"
-            ref="spellData"
+            ref="twoSpellData"
           >
             <el-table-column
               type="selection"
@@ -263,7 +263,7 @@
             :span-method="objectSpanMethod"
             border
             style="width: 100%; margin-top: 20px"
-            @selection-change="handleSelectionChange"
+            @selection-change="handleSelectionChangeSpelling"
             :row-key="getRowKey"
             max-height="500px"
             ref="spellData"
@@ -373,10 +373,11 @@ export default {
       activeName: 'first',
       tableData: [],
       tableData1: [],
-      tableData2:[],
+      tableData2: [],
       tableData3: [],
       //存放每一行记录的合并数
       spanArr: [],
+      spanArr1: [],
       maplist: [],
       id: null,
       option: [],
@@ -443,9 +444,10 @@ export default {
           })
           this.getNoSpellingArray()
           this.getSpellingArray()
+          this.getSpellingArrayTwo()
         } else {
           this.$message({
-            message: '撤失败',
+            message: '撤失败',
             type: 'error',
             duration: 2000,
             center: true,
@@ -470,12 +472,15 @@ export default {
     refresh() {
       this.getSpellingArray()
       this.getNoSpellingArray()
+      this.getSpellingArrayTwo()
       this.getSteelOrderNum()
       this.getStoreArray()
       this.redDotNum = null
       this.totalQueueNum = null
       this.totalQueueNumFirst = null
       this.isQueryCapacity = null
+      this.maplist = []
+      this.filterArr1 = []
       this.i = 0
       clearInterval(this.timer)
       this.start()
@@ -498,7 +503,11 @@ export default {
       } else {
         if (
           this.maplist.some(e => {
-            return e.ROW_ID == row.ROW_ID || e.ROW_ID + 1 == row.ROW_ID
+            return (
+              e.ROW_ID == row.ROW_ID ||
+              e.ROW_ID + 1 == row.ROW_ID ||
+              typeof row.ROW_ID == 'undefined'
+            )
           })
         ) {
           return true
@@ -509,7 +518,7 @@ export default {
     },
     selectInitSplleing(row) {
       if (this.maplist.length == 0) {
-        if (row.ROW_ID == 1) {
+        if (row.group + 1 == 1) {
           return true
         } else {
           return false
@@ -517,7 +526,7 @@ export default {
       } else {
         if (
           this.maplist.some(e => {
-            return e.ROW_ID == row.ROW_ID || e.ROW_ID + 1 == row.ROW_ID
+            return e.group == row.group || e.group + 1 == row.group
           })
         ) {
           return true
@@ -569,19 +578,19 @@ export default {
           .then(res => {
             this.tableData1 = res.data.data
           })
-      } else if(this.activeName ==second){
+      } else if (this.activeName == second) {
         this.axios
           .post('/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1', map)
           .then(res => {
             this.tableData = res.data.data
             this.getSpanArr(this.tableData)
           })
-      }else if (this.activeName == fourth){
+      } else if (this.activeName == fourth) {
         this.axios
           .post('/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=2', map)
           .then(res => {
             this.tableData2 = res.data.data
-            this.getSpanArr(this.tableData2)
+            this.getSpanArr1(this.tableData2)
           })
       }
       this.table1 = false
@@ -601,19 +610,39 @@ export default {
           this.spanArr.push(1)
           this.pos = 0
           data[i].group = i
-          data[i].ROW_ID = i + 1
         } else {
           // 判断当前元素与上一个元素是否相同
           if (data[i].resultTotalId === data[i - 1].resultTotalId) {
             this.spanArr[this.pos] += 1
             this.spanArr.push(0)
             data[i].group = data[i - 1].group
-            data[i].ROW_ID = data[i - 1].ROW_ID
           } else {
             this.spanArr.push(1)
             this.pos = i
             data[i].group = data[i - 1].group + 1
-            data[i].ROW_ID = data[i - 1].ROW_ID + 1
+          }
+        }
+      }
+    },
+    //记录每一行的合并数
+    getSpanArr1(data) {
+      //每次调用方法初始化
+      this.spanArr1 = []
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr1.push(1)
+          this.pos = 0
+          data[i].group = i
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].resultTotalId === data[i - 1].resultTotalId) {
+            this.spanArr1[this.pos] += 1
+            this.spanArr1.push(0)
+            data[i].group = data[i - 1].group
+          } else {
+            this.spanArr1.push(1)
+            this.pos = i
+            data[i].group = data[i - 1].group + 1
           }
         }
       }
@@ -640,6 +669,28 @@ export default {
         }
       }
     },
+    objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
+      if (
+        columnIndex === 0 ||
+        columnIndex === 1 ||
+        columnIndex === 2 ||
+        columnIndex === 3 ||
+        columnIndex === 4 ||
+        columnIndex === 10 ||
+        columnIndex === 11 ||
+        columnIndex === 12 ||
+        columnIndex === 13 ||
+        columnIndex === 14 ||
+        columnIndex === 15
+      ) {
+        const _row = this.spanArr1[rowIndex]
+        const _col = _row > 0 ? 1 : 0
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      }
+    },
     handleClick() {
       this.redDotNum = null
       this.totalQueueNum = null
@@ -649,7 +700,7 @@ export default {
         this.getNoSpellingArray()
       } else if (this.activeName == 'second') {
         this.getSpellingArray()
-      }else if (this.activeName == 'fourth'){
+      } else if (this.activeName == 'fourth') {
         this.getSpellingArrayTwo()
       } else {
         this.getStoreArray()
@@ -681,13 +732,13 @@ export default {
       this.axios
         .post(
           '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=2&i=' +
-          new Date()
+            new Date()
         )
         .then(res => {
           this.tableData2 = res.data.data
           this.isQueryCapacity = null
           console.log(this.tableData2)
-          this.getSpanArr(this.tableData2)
+          this.getSpanArr1(this.tableData2)
         })
     },
     getStoreArray() {
@@ -710,7 +761,7 @@ export default {
             this.tableData1 = res.data.data
           })
         console.log('wzxxx')
-      } else if (this.activeName == second){
+      } else if (this.activeName == second) {
         this.axios
           .post(
             '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=' +
@@ -723,24 +774,25 @@ export default {
             this.tableData = res.data.data
             this.getSpanArr(this.tableData)
           })
-      }else if (this.activeName ==fourth){
+      } else if (this.activeName == fourth) {
         this.axios
           .post(
             '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=2&i=' +
-            new Date() +
-            '&capacityNumber=' +
-            this.capacityNo
+              new Date() +
+              '&capacityNumber=' +
+              this.capacityNo
           )
           .then(res => {
             this.isQueryCapacity = 1
             this.tableData2 = res.data.data
-            this.getSpanArr(this.tableData2)
+            this.getSpanArr1(this.tableData2)
           })
       }
     },
     handleSelectionChange(selection) {
       this.maplist = []
       this.maplist = selection
+      console.log(selection)
       for (let i = 0; i < this.maplist.length; i++) {
         if (i + 1 < this.maplist.length) {
           if (this.maplist[i].ROW_ID + 1 != this.maplist[i + 1].ROW_ID) {
@@ -756,7 +808,28 @@ export default {
         })
       ) {
         this.$refs.mutiData.clearSelection()
+      }
+    },
+    handleSelectionChangeSpelling(selection) {
+      this.maplist = []
+      this.maplist = selection
+      console.log(selection)
+      for (let i = 0; i < this.maplist.length; i++) {
+        if (i + 1 < this.maplist.length) {
+          if (this.maplist[i].group + 1 != this.maplist[i + 1].group) {
+            this.$refs.spellData.clearSelection()
+            this.$refs.twoSpellData.clearSelection()
+          }
+        }
+      }
+      // 限制只取第一个去掉
+      if (
+        !this.maplist.some(e => {
+          return e.group == 0
+        })
+      ) {
         this.$refs.spellData.clearSelection()
+        this.$refs.twoSpellData.clearSelection()
       }
     },
     updateBill(scope) {
@@ -767,9 +840,20 @@ export default {
     },
     filterArr(resultId) {
       console.log('fdhjsaj')
-      this.filterArr1 = this.filterArr1.concat(
-        this.tableData.filter(ele => ele.resultId == resultId)
-      )
+      this.filterArr1 = []
+      if (this.activeName == 'first') {
+        this.filterArr1 = this.filterArr1.concat(
+          this.tableData1.filter(ele => ele.resultId == resultId)
+        )
+      } else if (this.activeName == 'second') {
+        this.filterArr1 = this.filterArr1.concat(
+          this.tableData.filter(ele => ele.resultId == resultId)
+        )
+      } else if (this.activeName == 'fourth') {
+        this.filterArr1 = this.filterArr1.concat(
+          this.tableData2.filter(ele => ele.resultId == resultId)
+        )
+      }
     },
     allow() {
       if (this.maplist.length == 0) {
@@ -814,6 +898,7 @@ export default {
         }
         this.filterArr(this.maplist[i].resultId)
       }
+      console.log(this.filterArr1, 'this.fil')
       var filterArr2 = []
       this.filterArr1.forEach(e => {
         if (filterArr2.indexOf(e) === -1) {
@@ -828,50 +913,77 @@ export default {
       if (this.activeName == 'first') {
         map.mapList = this.maplist
       }
-      console.log("勾选的数据")
+      console.log('勾选的数据')
       console.log(map)
-      this.axios.post('/api/v1/qms/allowEnFactory', map).then(res => {
-        if (res.data.code == '200') {
-          this.$message({
-            message: '放行成功,等待进厂',
-            type: 'success',
-            duration: 2000,
-            center: true,
-            offset: 100
-          })
+      this.axios
+        .post('/api/v1/qms/allowEnFactory', map)
+        .then(res => {
+          if (res.data.code == '200') {
+            this.$message({
+              message: '放行成功,等待进厂',
+              type: 'success',
+              duration: 2000,
+              center: true,
+              offset: 100
+            })
+            this.maplist = []
+            this.filterArr1 = []
+            this.$refs.mutiData.clearSelection()
+            this.$refs.spellData.clearSelection()
+            this.$refs.twoSpellData.clearSelection()
+            this.getNoSpellingArray()
+            this.getSpellingArray()
+            this.getSpellingArrayTwo()
+            this.getStoreArray()
+            this.redDotNum = null
+            this.totalQueueNum = null
+            this.totalQueueNumFirst = null
+            this.i = 0
+            clearInterval(this.timer)
+            this.start()
+          } else {
+            this.$message({
+              message: '请按顺序勾选',
+              type: 'error',
+              duration: 2000,
+              center: true,
+              offset: 100
+            })
+            this.maplist = []
+            this.filterArr1 = []
+            this.$refs.mutiData.clearSelection()
+            this.$refs.spellData.clearSelection()
+            this.$refs.twoSpellData.clearSelection()
+            this.getNoSpellingArray()
+            this.getSpellingArray()
+            this.getStoreArray()
+            this.getSpellingArrayTwo()
+            this.redDotNum = null
+            this.totalQueueNum = null
+            this.totalQueueNumFirst = null
+            this.i = 0
+            clearInterval(this.timer)
+            this.start()
+          }
+        })
+        .catch(e => {
+          console.log(e)
           this.maplist = []
+          this.filterArr1 = []
           this.$refs.mutiData.clearSelection()
           this.$refs.spellData.clearSelection()
+          this.$refs.twoSpellData.clearSelection()
           this.getNoSpellingArray()
           this.getSpellingArray()
           this.getStoreArray()
+          this.getSpellingArrayTwo()
           this.redDotNum = null
           this.totalQueueNum = null
           this.totalQueueNumFirst = null
           this.i = 0
           clearInterval(this.timer)
           this.start()
-        } else {
-          this.$message({
-            message: '请按顺序勾选',
-            type: 'error',
-            duration: 2000,
-            center: true,
-            offset: 100
-          })
-          this.maplist = []
-          this.$refs.mutiData.clearSelection()
-          this.getNoSpellingArray()
-          this.getSpellingArray()
-          this.getStoreArray()
-          this.redDotNum = null
-          this.totalQueueNum = null
-          this.totalQueueNumFirst = null
-          this.i = 0
-          clearInterval(this.timer)
-          this.start()
-        }
-      })
+        })
     },
     changePriority(row) {
       console.log('装货点:' + row.id)

+ 1 - 1
src/views/statisticalReport/components/Ship_dynamic_table.vue

@@ -198,7 +198,7 @@ export default {
         console.log("table_book:",table_book);
         console.log("sheet:",table_book.Sheets.Sheet1);
         //限制单元格样式范围
-        let rangeList=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q',,'R','S','T','U','V']
+        let rangeList=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q',,'R','S','T','U']
         //得到自定义过滤数组
         let filterList=this.exportFilter(table_book.Sheets.Sheet1);
         console.log("filterList:",filterList);

+ 44 - 43
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -91,7 +91,10 @@
           <!-- <el-button type="primary" @click="batchoperation()"
             ><i class="el-icon-edit"></i>批量更改</el-button
           > -->
-          <el-button type="primary" @click="checkPoint()"
+          <el-button
+            type="primary"
+            @click="checkPoint()"
+            v-if="!notRoutList.includes('checkPoint')"
             ><i class="el-icon-map-location"></i>实时路径</el-button
           >
         </el-form-item>
@@ -116,7 +119,6 @@
         ref="tableRef"
         border
         style="width: 100%; margin-top: 20px"
-        :max-height="maxHeight"
         :height="maxHeight"
         :row-class-name="tableRowClassName"
         @cell-click="cellClik"
@@ -125,6 +127,10 @@
         @row-click="rowClick"
         :cell-style="cellStyle"
         @filter-change="filterChange"
+        :key="saleSteelKey"
+        id="salesLogisticsStat_saleSteelReports_table"
+        individual-panel
+        @resetTable="reset"
       >
         <el-table-column
           width="50"
@@ -1023,7 +1029,7 @@
             ref="receive"
             list-type="picture-card"
             action="null"
-            :limit="5"
+            :limit="11"
             :on-change="fileChange2"
             :on-preview="handlePictureCardPreview"
             :on-exceed="exceed"
@@ -1325,26 +1331,31 @@ export default {
     },
     scrollTop: {
       immediate: true,
+      deep: true,
       handler(val) {
         this.$nextTick(() => {
+          if (
+            val >=
+            this.tableData.length * 30 -
+              document.querySelector('.el-table__body-wrapper').offsetHeight -
+              20
+          ) {
+            val =
+              this.tableData.length * 30 -
+              document.querySelector('.el-table__body-wrapper').offsetHeight
+          }
+          if (val <= 0) {
+            val = 0
+          }
+          document.querySelector(
+            '.el-table__body-wrapper .el-table__body'
+          ).style.transform = `translateY(${val}px)`
           const start = Math.floor(val / this.itemHeight)
-          this.visibleList = []
           this.visibleList = this.tableData.slice(
             start,
             start + Math.floor(this.maxHeight / this.itemHeight) + 1
           )
           this.getSpanArr(this.visibleList)
-          this.top = start * this.itemHeight
-          this.$nextTick(() => {
-            window.onresize = () => {
-              return (() => {
-                this.maxHeight = window.innerHeight - 150
-              })()
-            }
-          })
-          this.$refs.tableRef.$el.getElementsByClassName(
-            'el-table__body'
-          )[0].style.top = `${start * this.itemHeight}px`
         })
       }
     }
@@ -1360,12 +1371,13 @@ export default {
       }
     })
     this.$refs.tableRef.bodyWrapper.addEventListener('scroll', e => {
+      // console.log(e)
       if (this.debounceS) return
       this.debounceS = true
       this.scrollTop = e.target.scrollTop
       setTimeout(() => {
         this.debounceS = false
-      }, 50)
+      }, 70)
     })
   },
   activated() {
@@ -1723,7 +1735,7 @@ export default {
       })
       //车牌号筛选数组
       let capacityList = this.tableData.map(e => {
-        return e.capacityNo
+        return e.newCapacityNo
       })
       //物资筛选数组
       let materialNameList = this.tableData
@@ -1979,23 +1991,13 @@ export default {
             this.isShow2 = true
           }
           this.srcList2 = []
-          if (res.data.resultReceiveNotePhoto != null) {
-            this.srcList2.push({
-              title: '签收单',
-              src: res.data.resultReceiveNotePhoto
-            })
-          }
-          if (res.data.resultSignedNotePhoto != null) {
-            this.srcList2.push({
-              title: '质保书',
-              src: res.data.resultSignedNotePhoto
-            })
-          }
-          if (res.data.resultEmptyContainerPhoto != null) {
-            this.srcList2.push({
-              title: '空货箱照片',
-              src: res.data.resultEmptyContainerPhoto
-            })
+          if(res.data && res.data.length>0){
+            res.data.forEach(item=>{
+                this.srcList2.push({
+                title:"",
+                src:item
+              });
+            });
           }
         })
     },
@@ -2153,9 +2155,11 @@ export default {
         return
       }
       if (
-        !isVehicleNumber(this.steelMap.capacityNo) &&
-        (this.steelMap.capacityNo != '取消' ||
-          this.steelMap.capacityNo != '待定')
+        !(
+          isVehicleNumber(this.steelMap.capacityNo) ||
+          this.steelMap.capacityNo == '取消' ||
+          this.steelMap.capacityNo == '待定'
+        )
       ) {
         this.$message.error('请输入正确格式的车牌号!')
         return
@@ -2790,14 +2794,12 @@ export default {
         .then(res => {
           this.tableData = res.data.data
           this.totalHeight += this.itemHeight
-          this.visibleList = []
-          this.visibleList = this.tableData.slice(
-            0,
-            Math.floor(this.maxHeight / this.itemHeight) + 1
-          )
+          this.visibleList = res.data.data
+          console.log(this.visibleList, 'this.visibleList')
           this.getSpanArr(this.visibleList)
           this.getTotalNum(this.tableData)
           loading.close()
+          console.log(this.visibleList)
         })
     },
     //重新获取表格数据
@@ -2918,7 +2920,6 @@ export default {
     }
 
     ::-webkit-scrollbar {
-      // width: 20px;
       height: 20px;
       background-color: transparent;
     }

+ 5 - 5
src/views/statisticalReport/components/tableItem.vue

@@ -2,7 +2,7 @@
   <div>
     <table v-show="false">
       <tr>
-        <td colspan="18">达州钢铁每日船舶动态明细表</td>
+        <td colspan="17">达州钢铁每日船舶动态明细表</td>
         <td colspan="4">{{deadline}}</td> 
       </tr>
     </table>
@@ -87,16 +87,16 @@
         <!-- 库存表 -->
         <table v-show="false">
           <tr>
-            <td colspan="22">{{ downStockString }}</td>
+            <td colspan="21">{{ downStockString }}</td>
           </tr>
           <tr>
-            <td colspan="22">{{ stockString }}</td>
+            <td colspan="21">{{ stockString }}</td>
           </tr>
           <tr>
-            <td colspan="22">{{ runStockString }}</td>
+            <td colspan="21">{{ runStockString }}</td>
           </tr>
           <tr>
-            <td colspan="22"></td>
+            <td colspan="21"></td>
           </tr>
         </table>