luobang 2 anni fa
parent
commit
1d01c1d866

+ 131 - 130
src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.js

@@ -1,7 +1,7 @@
 /**
  * 组件编写人--杨海明
  */
-import Sortablejs from "sortablejs";
+import Sortablejs from 'sortablejs'
 export default {
   data() {
     return {
@@ -24,19 +24,19 @@ export default {
       // 保存表格所有页面所选中的数据
       dataRadioId: [],
       // 保存表格单选的数据 保存数据的id
-      dataRadioId: "",
+      dataRadioId: '',
       // 合并数组
       spanArr: []
-    };
+    }
   },
   created() {
     if (this.isHeigth) {
-      window.addEventListener("resize", this.getHeight);
-      this.getHeight();
+      window.addEventListener('resize', this.getHeight)
+      this.getHeight()
     }
-    this.dataCurrentPage = this.currentPage;
-    this.dataPageSize = this.pageSize;
-    this.requestData();
+    this.dataCurrentPage = this.currentPage
+    this.dataPageSize = this.pageSize
+    this.requestData()
   },
   mounted() {
     //行拖拽
@@ -48,70 +48,71 @@ export default {
     //记录每一行的合并数
     getSpanArr(data) {
       //每次调用方法初始化
-      this.spanArr = [];
+      this.spanArr = []
       for (var i = 0; i < data.length; i++) {
         if (i === 0) {
-          this.spanArr.push(1);
-          data[i].group = i;
-          this.pos = 0;
+          this.spanArr.push(1)
+          data[i].group = i
+          this.pos = 0
         } else {
           // 判断当前元素与上一个元素是否相同
           if (data[i][this.comparison] === data[i - 1][this.comparison]) {
-            this.spanArr[this.pos] += 1;
-            this.spanArr.push(0);
-            data[i].group = data[i - 1].group;
+            this.spanArr[this.pos] += 1
+            this.spanArr.push(0)
+            data[i].group = data[i - 1].group
           } else {
-            this.spanArr.push(1);
-            this.pos = i;
-            data[i].group = data[i - 1].group + 1;
+            this.spanArr.push(1)
+            this.pos = i
+            data[i].group = data[i - 1].group + 1
           }
         }
       }
-      this.$emit("funs", data);
+      this.$emit('funs', data)
     },
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
       if (this.columnIndexs.indexOf(columnIndex) != -1) {
-        const _row = this.spanArr[rowIndex];
-        const _col = _row > 0 ? 1 : 0;
+        const _row = this.spanArr[rowIndex]
+        const _col = _row > 0 ? 1 : 0
         return {
           rowspan: _row,
           colspan: _col
-        };
+        }
       }
     },
     getHeight() {
-      this.height = window.innerHeight - this.shiyHeigth;
+      this.height = window.innerHeight - this.shiyHeigth
     },
     // 通过请求获取数据
     requestData(options) {
-      console.log(options);
-      let pageNum = undefined;
-      let pageSize = undefined;
+      debugger
+      console.log(options)
+      let pageNum = undefined
+      let pageSize = undefined
 
       if (options) {
-        pageNum = options.pageNum;
-        pageSize = options.pageSize;
+        pageNum = options.pageNum
+        pageSize = options.pageSize
       }
 
       if (this.requestUrl) {
         // 处理请求地址逻辑
-        let url;
-        if (this.requestUrl.indexOf("//") > -1) {
-          url = this.requestUrl;
+        let url
+        if (this.requestUrl.indexOf('//') > -1) {
+          url = this.requestUrl
         } else {
-          url = this.requestUrl;
+          url = this.requestUrl
         }
         // 判断是否需要在请求体中放入参数
         if (this.requestQuery) {
-          this.dataRequestQuery = this.requestQuery;
+          this.dataRequestQuery = this.requestQuery
           // console.log(this.dataRequestQuery.resultBreakId)
         }
-        let data = undefined;
+        let data = undefined
         for (const key in this.dataRequestQuery) {
-          const val = this.dataRequestQuery[key];
+          const val = this.dataRequestQuery[key]
           if (val || val == 0) {
-            if (!data) data = {};
-            data[key] = val;
+            if (!data) data = {}
+            data[key] = val
           }
         }
         //判断是否是带分页查询
@@ -126,17 +127,17 @@ export default {
               }
             })
             .then(response => {
-              let d = response.data.data;
-              this.dataTabel = d.list;
-              this.getSpanArr(this.dataTabel);
-              console.log(this.dataTabel);
-              this.dataTotal = d.total;
+              let d = response.data.data
+              this.dataTabel = d.list
+              this.getSpanArr(this.dataTabel)
+              console.log(this.dataTabel)
+              this.dataTotal = d.total
               //执行成功的回调
-              this.$emit("func", response.data.data);
-              this.refreshColumnData(d.columnData);
-              this.isShow = true;
+              this.$emit('func', response.data.data)
+              this.refreshColumnData(d.columnData)
+              this.isShow = true
             })
-            .catch(() => {});
+            .catch(() => {})
         } else {
           // 发送请求
           this.axios
@@ -148,19 +149,19 @@ export default {
               }
             })
             .then(response => {
-              let d = response.data.data;
-              this.dataTabel = d.list;
-              this.dataTotal = d.total;
-              this.getSpanArr(this.dataTabel);
-              console.log(this.dataTabel);
+              let d = response.data.data
+              this.dataTabel = d.list
+              this.dataTotal = d.total
+              this.getSpanArr(this.dataTabel)
+              console.log(this.dataTabel)
               //执行成功的回调
-              this.$emit("func", response.data.data);
-              this.refreshColumnData(d.columnData);
-              this.isShow = true;
-            });
+              this.$emit('func', response.data.data)
+              this.refreshColumnData(d.columnData)
+              this.isShow = true
+            })
         }
       } else {
-        console.warn("requestUrl 参数不能为 null");
+        console.warn('requestUrl 参数不能为 null')
       }
     },
     // 刷新表头显示数据
@@ -172,10 +173,10 @@ export default {
       // }
       // 如果前端有写表头,则加在后端表头前面
 
-      const d = this.columnData.concat(columnData);
+      const d = this.columnData.concat(columnData)
       // 把操作列拼接到最后一列
-      this.dataColumnData = d;
-      this.dataDropColumn = [].concat(this.dataColumnData);
+      this.dataColumnData = d
+      this.dataDropColumn = [].concat(this.dataColumnData)
     },
     // 排序回调
     sortChange({ column, prop, order }) {
@@ -201,108 +202,108 @@ export default {
 
       // 后端排序
       let s = {
-        ascending: "asc",
-        descending: "desc"
-      };
+        ascending: 'asc',
+        descending: 'desc'
+      }
 
       let value = {
         orderType: s[order] || undefined,
         orderField: order ? prop : undefined
-      };
+      }
 
-      this.setDataRequestQuery(value);
+      this.setDataRequestQuery(value)
     },
     // 更新请求参数
     setDataRequestQuery(value) {
-      let q = this.dataRequestQuery;
+      let q = this.dataRequestQuery
       for (const key in value) {
-        q[key] = value[key];
+        q[key] = value[key]
       }
-      this.requestData(q);
-      this.$emit("update:requestQuery", q);
-      this.dataRequestQuery = q;
+      this.requestData(q)
+      this.$emit('update:requestQuery', q)
+      this.dataRequestQuery = q
     },
     // 格式化字符串
     getString(str) {
       if (str != null && str != undefined && str.toString) {
-        return str.toString();
+        return str.toString()
       } else {
-        return str || "";
+        return str || ''
       }
     },
     // 当某一行被点击时会触发该事件
     rowClick(row, column, event) {
-      if (this.selectionType == "radio") {
+      if (this.selectionType == 'radio') {
         if (this.dataRadioId == row.ROW_ID) {
-          this.dataRadioId = "";
-          row = {};
+          this.dataRadioId = ''
+          row = {}
         } else {
-          this.dataRadioId = row.ROW_ID;
+          this.dataRadioId = row.ROW_ID
         }
-        this.$emit("radio-change", row);
+        this.$emit('radio-change', row)
       }
     },
     // 多选的选中行改变回调
     selectionChange(selection) {
       // this.dataSelection = selection;
       // 将多选中的数据抛出
-      this.$emit("selection-change", selection);
+      this.$emit('selection-change', selection)
     },
     // 当表格的筛选条件发生变化的时候会触发该事件,
     // 参数的值是一个对象,对象的 key 是 column 的 columnKey,对应的 value 为用户选择的筛选条件的数组。
     filterChange(filters) {
-      let value = {};
+      let value = {}
       for (const key in filters) {
-        value[key] = filters[key].length > 0 ? filters[key] : undefined;
+        value[key] = filters[key].length > 0 ? filters[key] : undefined
       }
       // 每次筛选时,都默认将页面改为第一页,避免数据过少时,显示没有数据
-      this.currentChange(1, false);
-      this.setDataRequestQuery(value);
+      this.currentChange(1, false)
+      this.setDataRequestQuery(value)
     },
     // 行拖拽
     rowDrop() {
-      const tbody = document.querySelector(".el-table__body-wrapper tbody");
-      const _this = this;
+      const tbody = document.querySelector('.el-table__body-wrapper tbody')
+      const _this = this
       Sortablejs.create(tbody, {
         onEnd({ newIndex, oldIndex }) {
-          const currRow = _this.dataTabel.splice(oldIndex, 1)[0];
-          _this.dataTabel.splice(newIndex, 0, currRow);
+          const currRow = _this.dataTabel.splice(oldIndex, 1)[0]
+          _this.dataTabel.splice(newIndex, 0, currRow)
         }
-      });
+      })
     },
     // 列拖拽
     columnDrop() {
-      const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
+      const wrapperTr = document.querySelector('.el-table__header-wrapper tr')
       this.sortablejs = Sortablejs.create(wrapperTr, {
         animation: 180,
         delay: 0,
-        handle: ".allowDrag",
+        handle: '.allowDrag',
         onEnd: evt => {
           // 因为序号列和单多选列不在数组中,所以需要进行偏移计算
-          const offset = this.dragColumnOffset;
-          evt.oldIndex -= offset;
-          evt.newIndex -= offset;
+          const offset = this.dragColumnOffset
+          evt.oldIndex -= offset
+          evt.newIndex -= offset
           // 换列
-          const oldItem = this.dataDropColumn[evt.oldIndex];
-          this.dataDropColumn.splice(evt.oldIndex, 1);
-          this.dataDropColumn.splice(evt.newIndex, 0, oldItem);
+          const oldItem = this.dataDropColumn[evt.oldIndex]
+          this.dataDropColumn.splice(evt.oldIndex, 1)
+          this.dataDropColumn.splice(evt.newIndex, 0, oldItem)
         }
-      });
+      })
     },
     // current-page 改变时会触发
     currentChange(val, isRequest = true) {
       if (isRequest) {
-        this.requestData({ pageNum: val });
+        this.requestData({ pageNum: val })
       }
       // 最后通知父节点页面改变
-      this.dataCurrentPage = val;
-      this.$emit("update:current-page", val);
+      this.dataCurrentPage = val
+      this.$emit('update:current-page', val)
     },
     // pageSize 改变时会触发
     sizeChange(val) {
-      this.dataPageSize = val;
-      this.requestData({});
-      this.$emit("update:size-change", val);
+      this.dataPageSize = val
+      this.requestData({})
+      this.$emit('update:size-change', val)
     }
   },
   computed: {
@@ -310,55 +311,55 @@ export default {
     dataSortable() {
       return function(item) {
         if (item.template) {
-          return false;
+          return false
         } else if (item.sortable) {
-          return item.sortable;
+          return item.sortable
         } else {
-          return this.sortable;
+          return this.sortable
         }
-      };
+      }
     },
     // 计算每列的最小宽度
     dataColumnMinWidth() {
       return function(item) {
-        let mw = 0;
+        let mw = 0
         if (this.dataSortable(item)) {
           // 如果使用排序功能
-          mw += 30;
+          mw += 30
         }
 
         if (item.filters && item.filters.length > 0) {
-          mw += 20;
+          mw += 20
         }
         if (item.label) {
-          mw += item.label.toString().length * 30;
+          mw += item.label.toString().length * 30
         }
-        return mw;
-      };
+        return mw
+      }
     },
     // 计算拖拽列的偏移差
     dragColumnOffset() {
-      let o = 0;
+      let o = 0
       if (this.showIndex) {
-        o++;
+        o++
       }
-      if (this.selectionType != "") {
-        o++;
+      if (this.selectionType != '') {
+        o++
       }
-      return o;
+      return o
     }
   },
   watch: {
-    requestQuery: {
-      deep: true,
-      handler(val, oldVal) {
-        let q = this.dataRequestQuery;
-        for (const key in val) {
-          q[key] = val[key] ? val[key] : undefined;
-        }
-        this.setDataRequestQuery(q);
-      }
-    }
+    // requestQuery: {
+    //   deep: true,
+    //   handler(val, oldVal) {
+    //     let q = this.dataRequestQuery
+    //     for (const key in val) {
+    //       q[key] = val[key] ? val[key] : undefined
+    //     }
+    //     this.setDataRequestQuery(q)
+    //   }
+    // }
   },
   // 注册组件
   components: {
@@ -366,18 +367,18 @@ export default {
     componentProxy: {
       props: {
         html: {
-          default: ""
+          default: ''
         },
         scope: {
           default() {
-            return {};
+            return {}
           }
         }
       },
       template: ``,
       created() {
-        this.$options.template = this.html;
+        this.$options.template = this.html
       }
     }
   }
-};
+}

+ 14 - 10
src/components/DilCommonUI/packages/table/src/table.js

@@ -45,6 +45,8 @@ export default {
     },
     // 通过请求获取数据
     requestData(options) {
+      // debugger
+      console.log('我被调用了几次')
       let pageNum = undefined
       let pageSize = undefined
 
@@ -300,16 +302,18 @@ export default {
     }
   },
   watch: {
-    requestQuery: {
-      deep: true,
-      handler(val, oldVal) {
-        let q = this.dataRequestQuery
-        for (const key in val) {
-          q[key] = val[key] ? val[key] : undefined
-        }
-        this.setDataRequestQuery(q)
-      }
-    }
+    // requestQuery: {
+    //   deep: true,
+    //   handler(val, oldVal) {
+    //     console.log(oldVal, 'oldVal')
+    //     let q = this.dataRequestQuery
+    //     for (const key in val) {
+    //       q[key] = val[key] ? val[key] : undefined
+    //     }
+    //     console.log(q, 'q')
+    //     this.setDataRequestQuery(q)
+    //   }
+    // }
   },
   // 注册组件
   components: {

+ 2 - 1
src/views/appoint/components/saleContract/addSaleOrderCoproductSend.vue

@@ -815,7 +815,8 @@ export default {
         this.axios
           .post('/api/v1/ams/dispatchTruckOrderBySale', {
             saleOrderId: this.$route.params.saleOrderId,
-            mapList: this.selectionList
+            mapList: this.selectionList,
+            userName: getCookie('loginName')
           })
           .then(res => {
             if (res.data.code == '200') {

+ 2 - 1
src/views/appoint/components/saleContract/addSaleOrderCoproductSendCarrier.vue

@@ -820,7 +820,8 @@ export default {
         this.axios
           .post('/api/v1/ams/dispatchTruckOrderBySale', {
             saleOrderId: this.$route.params.saleOrderId,
-            mapList: this.selectionList
+            mapList: this.selectionList,
+            userName: getCookie('loginName')
           })
           .then(res => {
             if (res.data.code == '200') {

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

@@ -92,7 +92,7 @@
         ref="tableRef"
         border
         style="width: 100%; margin-top: 20px"
-        max-height="500px"
+        max-height="600px"
         @row-click="rowClick"
         :row-class-name="tableRowClassName"
         :row-style="{ height: '30px' }"

+ 7 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/saleChemicalCokeForm.vue

@@ -806,8 +806,15 @@ export default {
       let startTime = null
       let endTime = null
       let requestQuery = {}
+      if (!this.condition1) {
+        requestQuery['remarkNo'] = this.input1 + ''
+      }
+      if (!this.condition2) {
+        requestQuery['remarkNo2'] = this.input2 + ''
+      }
       requestQuery[this.condition1] = this.input1 + ''
       requestQuery[this.condition2] = this.input2 + ''
+
       this.option.requestQuery = requestQuery
       if (this.startTime && this.endTime) {
         startTime = sjTime(this.startTime)

+ 6 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/saleCoproductForm.vue

@@ -748,6 +748,12 @@ export default {
       let startTime = null
       let endTime = null
       let requestQuery = {}
+      if (!this.condition1) {
+        requestQuery['remarkNo'] = this.input1 + ''
+      }
+      if (!this.condition2) {
+        requestQuery['remarkNo2'] = this.input2 + ''
+      }
       requestQuery[this.condition1] = this.input1 + ''
       requestQuery[this.condition2] = this.input2 + ''
       this.option.requestQuery = requestQuery