瀏覽代碼

大宗数据查询

QuietShadow 3 年之前
父節點
當前提交
9a5a0cbba9

+ 1 - 1
src/views/basicInformation/components/executiveStandard.vue

@@ -295,7 +295,7 @@ export default {
       let start = (that.rightTable.pageNum - 1) * that.rightTable.pageSize;
       if (start >= that.rightTable.tableData.arr.length) start = 0;
       let end = that.rightTable.pageNum * that.rightTable.pageSize;
-      if (end >= that.rightTable.tableData.length) end = that.rightTable.tableData.arr.length;
+      if (end >= that.rightTable.tableData.arr.length) end = that.rightTable.tableData.arr.length;
       // that.rightTable.tableData.arr = that.rightTable.tableData.arr.slice(start, end);
       that.rightTable.total = that.rightTable.tableData.arr.length;
       Tdata = that.rightTable.tableData.arr;

+ 21 - 12
src/views/energyAnalysis/components/indexManagement/indexMaintain.vue

@@ -245,7 +245,8 @@
                                             v-model="filterForm.data.workprocid"
                                             placeholder=""
                                             multiple
-                                            collapse-tags
+                                            collapse-tags
+                                            :disabled="filterForm.disabled.workprocid"
                                             style="width: 100%;"
                                         >
                                             <el-option
@@ -281,8 +282,9 @@
                         icon="el-icon-plus"
                         v-privilege="activeMenu + 'ADD'"
                         @click="but_add"
-                    >新增</el-button>
-                    <el-button v-show="table.type === 1"
+                    >新增</el-button>
+                    <span v-show="table.type === 1">
+                    <el-button
                         class="button"
                         type="primary"
                         size="mini"
@@ -291,7 +293,7 @@
                         @click="but_edit_plural()"
                         :loading="loading"
                     >修改</el-button>
-                    <el-button v-show="table.type === 1"
+                    <el-button
                         class="button"
                         type="danger"
                         size="mini"
@@ -299,7 +301,8 @@
                         v-privilege="activeMenu + 'DELETE'"
                         @click="but_del_plural()"
                         :loading="loading"
-                    >删除</el-button>
+                    >删除</el-button>
+                    </span>
                     <div style="float:right; text-align: right;">
                         <el-button
                             class="button"
@@ -1284,6 +1287,9 @@ export default {
                     version: formatDate(new Date(), 'yyyyMM00')
                 },
                 rules: {
+                },
+                disabled: {
+                    workprocid: false
                 }
             },
             listTopicTree: {
@@ -1495,7 +1501,11 @@ export default {
             setTimeout(() => {
                 that.singleTableHeight = that.getRoleHeight(that.$refs['box_bottom']) - 60;
             }, 1);
-        });
+        });
+        if (that.$route.query.workprocid) {
+            that.filterForm.disabled.workprocid = true;
+            that.filterForm.data.workprocid = that.$route.query.workprocid.split(',');
+        }
         that.getEnergyIdData();
         that.getNodeData();
         that.getFactoryIdData();
@@ -1866,8 +1876,7 @@ export default {
                                     mintimegranid: item.mintimegranid,
                                     warnvalue: item.warnvalue,
                                     useflag: item.useflag,
-                                    propertyid: item.propertyid,
-                                    seqno: item.seqno,
+                                    propertyid: item.propertyid
                                 })
                             }
                             console.log('测试');
@@ -2166,7 +2175,7 @@ export default {
                                 useflag: that.tableFormDataObj[key].useflag,
                                 seqno: that.tableFormDataObj[key].seqno,
                                 code: that.tableFormDataObj[key].code,
-                                propertyid:that.tableFormDataObj[key].propertyid
+                                propertyid: that.tableFormDataObj[key].propertyid
                             });
                         }
                         that.loading = true;
@@ -2210,9 +2219,9 @@ export default {
                             this.$message.error('精度为非负整数');
                         } else if (col && col === 'warnvalue') {
                             this.$message.error('超标警告数值为0-100');
-                        } else if(col  && col === 'propertyid'){
+                        } else if (col && col === 'propertyid') {
                             this.$message.error('请填写属性');
-                        }else {
+                        } else {
                             this.$message.error('数据不完整或者格式错误');
                         }
                     }
@@ -2332,7 +2341,7 @@ export default {
             let SubmitData = [{
                 itemid: row.itemid,
                 workprocid: row.workprocid,
-                propertyid:row.propertyid,
+                propertyid: row.propertyid,
                 factoryid: row.factoryid,
                 useflag: useflag,
                 mintimegranid: row.mintimegranid

+ 311 - 0
src/views/systemInterface/components/DzMaterial/getDzMaterial.vue

@@ -0,0 +1,311 @@
+<template>
+  <!-- 查询大宗物料收发数据 -->
+  <div class="getDzMaterial">
+    <div class="box">
+        <div class="box-top">
+          <el-form style="overflow: hidden;" :style="filterForm.show ? null : { height: '0px' }"
+            class="box-top-form" size="mini" label-width="60px">
+            <el-row>
+              <el-col :span="4">
+                <el-form-item label="过磅日期">
+                  <el-input clearable v-model="filterForm.data.gbsj"
+                    placeholder="过磅日期: 2022-01-01" style="width: 95%;" ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="3">
+                <el-form-item label="物料分类">
+                  <el-input clearable v-model="filterForm.data.cinvcname"
+                    placeholder="物料分类: 其它原料" style="width: 95%;" ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="3">
+                <el-form-item label="物料名称">
+                  <el-input clearable v-model="filterForm.data.cinvname"
+                    placeholder="物料名称: 废钢" style="width: 98%;"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="4">
+                <el-form-item label="规格">
+                  <el-input clearable v-model="filterForm.data.cinvstd"
+                    placeholder="规格: 直径≥10mm,长≤100mm" style="width: 95%;" ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="4">
+                <el-form-item label="仓库名称">
+                  <el-input clearable v-model="filterForm.data.cwhname"
+                    placeholder="仓库名称: 原材料厂区库" style="width: 98%;" ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="3">
+                <el-form-item label="单据类型">
+                  <el-input clearable v-model="filterForm.data.djlx"
+                    placeholder="单据类型: 收货" style="width: 100%;" ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="3">
+                <el-form-item label="去向">
+                  <el-input clearable v-model="filterForm.data.place"
+                    placeholder="去向: 废钢中心" style="width: 100%;" ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+          <div class="box-top-gjl">
+            <div style="float:right; text-align: right;">
+                <el-button class="button" type="primary" size="mini" icon="el-icon-search"
+                  v-privilege="activeMenu + 'QUERY'" :loading="rightTable.loading" @click="getTableData(1)" >查询</el-button>
+                <el-button class="button" type="primary" size="mini" icon="el-icon-refresh"
+                  v-privilege="activeMenu + 'QUERY'" :loading="rightTable.loading" @click="tableDataCancel();" >重置</el-button>
+                <el-button size="mini" :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
+                  :title="filterForm.show ? '收起搜索区' : '展开搜索区'" @click="filterForm.show = !filterForm.show;
+                    $nextTick(() => { singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 45; });"
+                >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+            </div>
+          </div>
+        </div>
+        <div class="box-bottom">
+            <el-table stripe border highlight-current-row id="singleTable" ref="singleTable" style="width: 100%;" size="mini"
+              :data="rightTable.tableData.arr" v-loading="rightTable.loading" :height="singleTableHeight" show-summary :summary-method="getSummaries">
+                <el-table-column sortable prop="gbsj" label="过磅日期" min-width="80px" align="center"
+                  :show-overflow-tooltip="true">
+                  </el-table-column>
+                <el-table-column sortable prop="cinvccode" label="物料分类编码" min-width="86px" align="center"
+                  :show-overflow-tooltip="true">
+                </el-table-column>
+                <el-table-column sortable prop="cinvcname" label="物料分类名称" min-width="100px" align="center"
+                  :show-overflow-tooltip="true">
+                </el-table-column>
+                <el-table-column sortable prop="cinvcode" label="物料编码" min-width="100px" align="center"
+                  :show-overflow-tooltip="true">
+                </el-table-column>
+                <el-table-column sortable prop="cinvname" label="物料名称" min-width="100px" align="center"
+                  :show-overflow-tooltip="true">
+                </el-table-column>
+                <el-table-column sortable prop="cinvstd" label="规格" min-width="70px" align="center"
+                  :show-overflow-tooltip="true"></el-table-column>
+                <el-table-column sortable prop="cwhcode" label="仓库编码" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" ></el-table-column>
+                <el-table-column sortable prop="cwhname" label="仓库名称" min-width="90px" align="center"
+                  :show-overflow-tooltip="true" ></el-table-column>
+                <el-table-column sortable prop="mz" label="毛重" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" :formatter="rounding" ></el-table-column>
+                <el-table-column sortable prop="pz" label="皮重" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" :formatter="rounding" ></el-table-column>
+                <el-table-column sortable prop="jz" label="净重" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" :formatter="rounding" ></el-table-column>
+                <el-table-column sortable prop="djlx" label="单据类型" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" ></el-table-column>
+                <el-table-column sortable prop="pzdl" label="配置单料" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" ></el-table-column>
+                <el-table-column sortable prop="tab" label="所属表" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" ></el-table-column>
+                <el-table-column sortable prop="place" label="去向" min-width="120px" align="center"
+                  :show-overflow-tooltip="true" ></el-table-column>
+                <el-table-column sortable prop="bfsfclWater" label="水分" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" :formatter="rounding" ></el-table-column>
+                <el-table-column sortable prop="bfsfclZazhi" label="杂质" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" :formatter="rounding" ></el-table-column>
+                <el-table-column sortable prop="bfsfclKz" label="扣杂" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" :formatter="rounding" ></el-table-column>
+                <el-table-column sortable prop="readtime" label="接收时间" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" ></el-table-column>
+            </el-table>
+          <el-pagination layout="total, sizes, prev, pager, next, jumper" style="text-align: right;margin-top: 10px;"
+            :page-sizes="[10, 20, 50, 100, 500, 1000]"
+            :total="rightTable.total" :page-size="rightTable.pageSize" :current-page.sync="rightTable.pageNum"
+            @size-change="tableSizeChange" @current-change="getTableData"></el-pagination>
+        </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { zCheckNumber1 } from '~/utils/validator.js';
+import store from '@/store/index.js';
+import {formatDate, XtcommonSummaries} from '@/utils/util.js';
+export default {
+  name: 'getDzMaterial',
+  data () {
+    return {
+      activeMenu: '',
+      singleTableHeight: 100,
+      tableData: {
+          arr: [],
+          obj: {}
+        },
+      filterForm: {
+        show: true,
+        data: {
+          gbsj: '',
+          cinvcname: '',
+          cinvname: '',
+          cinvstd: '',
+          cwhname: '',
+          djlx: '',
+          place: ''
+        }
+      },
+      rightTable: {
+        total: 0,
+        pageNum: 1,
+        pageSize: 20,
+        loading: false,
+        tableLoading: false,
+        tableData: {
+          arr: [],
+          obj: {}
+        }
+      }
+    }
+  },
+  created () {
+      this.activeMenu = window.localStorage.getItem('activeMenu');
+  },
+  mounted () {
+    let that = this;
+    window.PEDataObj = {
+      // 将数据绑定到window上,供main页面使用
+      vm: that,
+      // tableArr:用于导出成Excel的表格的信息
+      tableArr: [{
+        name: '',
+        id: 'singleTable'
+      }]
+    };
+    that.$nextTick(() => {
+      // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+      setTimeout(() => {
+        that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
+      }, 1);
+    });
+    // 这里写页面加载需要调用的代码
+    that.getTableData();
+  },
+  methods: {
+    //  计算树区域高度
+    getRoleHeight (dom) {
+        return window.innerHeight - dom.offsetTop;
+    },
+    // 自定义的表格合计方法:只给指定列进行合计
+    getSummaries (param) {
+        const prop = ['mz', 'pz', 'jz', 'bfsfclWater', 'bfsfclZazhi', 'bfsfclKz']; // 合计列绑定的prop
+        return XtcommonSummaries(param, prop);
+    },
+    // 获取表格中的数据
+    getTableData (pageNum) {
+        let that = this, obj = {}, params;
+        params = {
+           gbsj: that.filterForm.data.gbsj,
+           cinvcname: that.filterForm.data.cinvcname,
+           cinvname: that.filterForm.data.cinvname,
+           cinvstd: that.filterForm.data.cinvstd,
+           cwhname: that.filterForm.data.cwhname,
+           djlx: that.filterForm.data.djlx,
+           place: that.filterForm.data.place
+        };
+        that.rightTable.pageNum = pageNum || that.rightTable.pageNum;
+        let url = 'pass/ems/v1/dzmaterialsfs/like/?pageNum=' + that.rightTable.pageNum + '&pageSize=' + that.rightTable.pageSize;
+        that.rightTable.loading = true;
+        that.axios.get(url, {params: params})
+          .then(function (res) {
+            if (res.code === '0') {
+              that.tableData.arr = res.data.list;
+              that.rightTable.tableData.arr = res.data.list;
+              that.rightTable.total = res.data.total;
+            } else {
+              that.$message.error(res.message);
+            }
+            that.rightTable.loading = false;
+          }).catch(function () {
+            that.rightTable.loading = false;
+          });
+    },
+    // 改变表格显示条数
+    tableSizeChange (val) {
+        let that = this;
+        that.rightTable.pageSize = val;
+        that.getTableData(1);
+    },
+    // 重置搜索
+    tableDataCancel () {
+      let that = this;
+      that.filterForm.data.gbsj = '';
+      that.filterForm.data.cinvcname = '';
+      that.filterForm.data.cinvname = '';
+      that.filterForm.data.cinvstd = '';
+      that.filterForm.data.cwhname = '';
+      that.filterForm.data.djlx = '';
+      that.filterForm.data.place = '';
+    },
+    rounding (row, column) {
+      return parseFloat(row[column.property]).toFixed(2)
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.getDzMaterial {
+  min-width: 700px;
+  height: 100%;
+  .box {
+    height: 100%;
+    padding: 15px 15px 0 15px;
+    .box-left {
+      float: left;
+      width: 200px;
+      height: calc(100% - 3px);
+      overflow: auto;
+      .box-left-bt {
+        line-height: 35px;
+        font-size: 16px;
+        border-bottom: 1px solid #ccc;
+      }
+      .box-left-tree {
+        height: calc(100% - 50px);
+        overflow: auto;
+        padding: 7px 7px 0 0;
+          .tree-row-on {
+            color: #3279e8;
+            font-weight: 600;
+          }
+      }
+    }
+    .box-top {
+      .box-top-form {
+        padding-left: 7px;
+        .el-form-item {
+          margin-bottom: 7px;
+        }
+      }
+      .box-top-gjl {
+        overflow: hidden;
+        padding: 7px 0 7px 7px;
+        border-top: 1px solid #ccc;
+      }
+    }
+    .box-bottom {
+      padding-left: 7px;
+    }
+
+    .el-table .el-table__row {
+      height: 35px;
+    }
+    .el-table__body .el-form-item--mini.el-form-item {
+      margin: 0px;
+      .error {
+        overflow: hidden;
+        color: #f56c6c;
+        font-size: 12px;
+        line-height: 1;
+      }
+    }
+  }
+  .color_no {
+    color: #7a7a7a;
+  }
+  .color_yes {
+    color: #1a9f17;
+  }
+}
+</style>

+ 333 - 0
src/views/systemInterface/components/DzMaterial/getDzMaterialReal.vue

@@ -0,0 +1,333 @@
+<template>
+  <!-- 查询大宗物料收发数据 -->
+  <div class="getDzMaterialReal">
+    <div class="box">
+        <div class="box-top">
+          <el-form style="overflow: hidden;" :style="filterForm.show ? null : { height: '0px' }"
+            class="box-top-form" size="mini" label-width="60px">
+            <el-row>
+              <el-col :span="4">
+                <el-form-item label="过磅日期">
+                  <el-input clearable v-model="filterForm.data.gbsj"
+                    placeholder="过磅日期: 2022-01-01" style="width: 95%;" ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="3">
+                <el-form-item label="物料分类">
+                  <el-input clearable v-model="filterForm.data.cinvcname"
+                    placeholder="物料分类: 其它原料" style="width: 95%;" ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="3">
+                <el-form-item label="物料名称">
+                  <el-input clearable v-model="filterForm.data.cinvname"
+                    placeholder="物料名称: 废钢" style="width: 98%;"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="4">
+                <el-form-item label="规格">
+                  <el-input clearable v-model="filterForm.data.cinvstd"
+                    placeholder="规格: 直径≥10mm,长≤100mm" style="width: 95%;" ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="4">
+                <el-form-item label="仓库名称">
+                  <el-input clearable v-model="filterForm.data.cwhname"
+                    placeholder="仓库名称: 原材料厂区库" style="width: 98%;" ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="3">
+                <el-form-item label="单据类型">
+                  <el-input clearable v-model="filterForm.data.djlx"
+                    placeholder="单据类型: 收货" style="width: 100%;" ></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="3">
+                <el-form-item label="去向">
+                  <el-input clearable v-model="filterForm.data.place"
+                    placeholder="去向: 废钢中心" style="width: 100%;" ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+          <div class="box-top-gjl">
+            <div style="float:right; text-align: right;">
+                <el-button class="button" type="primary" size="mini" icon="el-icon-search"
+                  v-privilege="activeMenu + 'QUERY'" :loading="rightTable.loading" @click="getTableData()" >查询</el-button>
+                <el-button class="button" type="primary" size="mini" icon="el-icon-refresh"
+                  v-privilege="activeMenu + 'QUERY'" :loading="rightTable.loading" @click="tableDataCancel();" >重置</el-button>
+                <el-button size="mini" :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
+                  :title="filterForm.show ? '收起搜索区' : '展开搜索区'" @click="filterForm.show = !filterForm.show;
+                    $nextTick(() => { singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 45; });"
+                >{{ filterForm.show ? '收起' : '展开' }}</el-button>
+            </div>
+          </div>
+        </div>
+        <div class="box-bottom">
+            <el-table stripe border highlight-current-row id="singleTable" ref="singleTable" style="width: 100%;" size="mini"
+              :data="frontEndPageChange" v-loading="rightTable.loading" :height="singleTableHeight" show-summary :summary-method="getSummaries">
+                <el-table-column sortable prop="gbsj" label="过磅日期" min-width="80px" align="center"
+                  :show-overflow-tooltip="true">
+                  </el-table-column>
+                <el-table-column sortable prop="cinvccode" label="物料分类编码" min-width="86px" align="center"
+                  :show-overflow-tooltip="true">
+                </el-table-column>
+                <el-table-column sortable prop="cinvcname" label="物料分类名称" min-width="100px" align="center"
+                  :show-overflow-tooltip="true">
+                </el-table-column>
+                <el-table-column sortable prop="cinvcode" label="物料编码" min-width="100px" align="center"
+                  :show-overflow-tooltip="true">
+                </el-table-column>
+                <el-table-column sortable prop="cinvname" label="物料名称" min-width="100px" align="center"
+                  :show-overflow-tooltip="true">
+                </el-table-column>
+                <el-table-column sortable prop="cinvstd" label="规格" min-width="70px" align="center"
+                  :show-overflow-tooltip="true"></el-table-column>
+                <el-table-column sortable prop="cwhcode" label="仓库编码" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" ></el-table-column>
+                <el-table-column sortable prop="cwhname" label="仓库名称" min-width="90px" align="center"
+                  :show-overflow-tooltip="true" ></el-table-column>
+                <el-table-column sortable prop="mz" label="毛重" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" :formatter="rounding" ></el-table-column>
+                <el-table-column sortable prop="pz" label="皮重" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" :formatter="rounding" ></el-table-column>
+                <el-table-column sortable prop="jz" label="净重" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" :formatter="rounding" ></el-table-column>
+                <el-table-column sortable prop="djlx" label="单据类型" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" ></el-table-column>
+                <el-table-column sortable prop="pzdl" label="配置单料" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" ></el-table-column>
+                <el-table-column sortable prop="tab" label="所属表" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" ></el-table-column>
+                <el-table-column sortable prop="place" label="去向" min-width="120px" align="center"
+                  :show-overflow-tooltip="true" ></el-table-column>
+                <el-table-column sortable prop="bfsfclWater" label="水分" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" :formatter="rounding" ></el-table-column>
+                <el-table-column sortable prop="bfsfclZazhi" label="杂质" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" :formatter="rounding" ></el-table-column>
+                <el-table-column sortable prop="bfsfclKz" label="扣杂" min-width="70px" align="center"
+                  :show-overflow-tooltip="true" :formatter="rounding" ></el-table-column>
+            </el-table>
+          <el-pagination layout="total, sizes, prev, pager, next, jumper" style="text-align: right;margin-top: 10px;"
+            :page-sizes="[10, 20, 50, 100, 500, 1000]"
+            :total="rightTable.total" :page-size="rightTable.pageSize" :current-page.sync="rightTable.pageNum"
+            @size-change="tableSizeChange" ></el-pagination>
+        </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { zCheckNumber1 } from '~/utils/validator.js';
+import store from '@/store/index.js';
+import {formatDate, XtcommonSummaries} from '@/utils/util.js';
+export default {
+  name: 'getDzMaterialReal',
+  data () {
+    return {
+      activeMenu: '',
+      singleTableHeight: 100,
+      tableData: {
+          arr: [],
+          obj: {}
+        },
+      filterForm: {
+        show: true,
+        data: {
+          gbsj: '',
+          cinvcname: '',
+          cinvname: '',
+          cinvstd: '',
+          cwhname: '',
+          djlx: '',
+          place: ''
+        }
+      },
+      rightTable: {
+        total: 0,
+        pageNum: 1,
+        pageSize: 20,
+        loading: false,
+        tableLoading: false,
+        tableData: {
+          arr: [],
+          obj: {}
+        }
+      }
+    }
+  },
+  created () {
+      this.activeMenu = window.localStorage.getItem('activeMenu');
+  },
+  mounted () {
+    let that = this;
+    window.PEDataObj = {
+      // 将数据绑定到window上,供main页面使用
+      vm: that,
+      // tableArr:用于导出成Excel的表格的信息
+      tableArr: [{
+        name: '',
+        id: 'singleTable'
+      }]
+    };
+    that.$nextTick(() => {
+      // 立即获取的height有一定偏差,通过setTimeout延迟来解决
+      setTimeout(() => {
+        that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
+      }, 1);
+    });
+    // 这里写页面加载需要调用的代码
+    that.getTableData();
+  },
+  computed: {
+    frontEndPageChange () {
+      let that = this;
+      let Tdata = [];
+      let start = (that.rightTable.pageNum - 1) * that.rightTable.pageSize;
+      if (start >= that.rightTable.tableData.arr.length) start = 0;
+      let end = that.rightTable.pageNum * that.rightTable.pageSize;
+      if (end >= that.rightTable.tableData.arr.length) end = that.rightTable.tableData.arr.length;
+      // that.rightTable.tableData.arr = that.rightTable.tableData.arr.slice(start, end);
+      that.rightTable.total = that.rightTable.tableData.arr.length;
+      Tdata = that.rightTable.tableData.arr;
+      Tdata = Tdata.filter(data => !that.filterForm.data.gbsj || data.gbsj.toLowerCase()
+        .includes(that.filterForm.data.gbsj.toLowerCase()));
+      Tdata = Tdata.filter(data => !that.filterForm.data.cinvcname || data.cinvcname.toLowerCase()
+        .includes(that.filterForm.data.cinvcname.toLowerCase()));
+      Tdata = Tdata.filter(data => (!that.filterForm.data.cinvname || !data.cinvname) || data.cinvname.toLowerCase()
+        .includes(that.filterForm.data.cinvname.toLowerCase()));
+      Tdata = Tdata.filter(data => (!that.filterForm.data.cinvstd || !data.cinvstd) || data.cinvstd.toLowerCase()
+        .includes(that.filterForm.data.cinvstd.toLowerCase()));
+      Tdata = Tdata.filter(data => (!that.filterForm.data.cwhname || !data.cwhname) || data.cwhname.toLowerCase()
+        .includes(that.filterForm.data.cwhname.toLowerCase()));
+      Tdata = Tdata.filter(data => (!that.filterForm.data.djlx || !data.djlx) || data.djlx.toLowerCase()
+        .includes(that.filterForm.data.djlx.toLowerCase()));
+      Tdata = Tdata.filter(data => (!that.filterForm.data.place || !data.place) || data.place.toLowerCase()
+        .includes(that.filterForm.data.place.toLowerCase()));
+      that.rightTable.total = Tdata.length;
+      return Tdata.slice(start, end);
+    }
+  },
+  methods: {
+    //  计算树区域高度
+    getRoleHeight (dom) {
+        return window.innerHeight - dom.offsetTop;
+    },
+    // 自定义的表格合计方法:只给指定列进行合计
+    getSummaries (param) {
+        const prop = ['mz', 'pz', 'jz', 'bfsfclWater', 'bfsfclZazhi', 'bfsfclKz']; // 合计列绑定的prop
+        return XtcommonSummaries(param, prop);
+    },
+    // 获取表格中的数据
+    getTableData (pageNum) {
+        let that = this, obj = {};
+        let url = 'pass/product/v1/dematerialSfDb/getDzMaterialSf';
+        that.rightTable.loading = true;
+        that.axios.get(url)
+          .then(function (res) {
+            if (res) {
+              that.tableData.arr = res;
+              that.rightTable.tableData.arr = res.sort((a, b) => {
+                // 排序基于的数据
+                let agbsj = a.gbsj;
+                let bgbsj = b.gbsj;
+                agbsj = agbsj.replace(/-/g, '/');
+                bgbsj = bgbsj.replace(/-/g, '/');
+                let atime = new Date(agbsj).getTime();
+                let btime = new Date(bgbsj).getTime();
+                return atime - btime;
+                });
+            }
+            that.rightTable.loading = false;
+          }).catch(function () {
+            that.rightTable.loading = false;
+          });
+    },
+    // 改变表格显示条数
+    tableSizeChange (val) {
+        let that = this;
+        that.rightTable.pageSize = val;
+    },
+    // 重置搜索
+    tableDataCancel () {
+      let that = this;
+      that.filterForm.data.gbsj = '';
+      that.filterForm.data.cinvcname = '';
+      that.filterForm.data.cinvname = '';
+      that.filterForm.data.cinvstd = '';
+      that.filterForm.data.cwhname = '';
+      that.filterForm.data.djlx = '';
+      that.filterForm.data.place = '';
+    },
+    rounding (row, column) {
+      return parseFloat(row[column.property]).toFixed(2)
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.getDzMaterialReal {
+  min-width: 700px;
+  height: 100%;
+  .box {
+    height: 100%;
+    padding: 15px 15px 0 15px;
+    .box-left {
+      float: left;
+      width: 200px;
+      height: calc(100% - 3px);
+      overflow: auto;
+      .box-left-bt {
+        line-height: 35px;
+        font-size: 16px;
+        border-bottom: 1px solid #ccc;
+      }
+      .box-left-tree {
+        height: calc(100% - 50px);
+        overflow: auto;
+        padding: 7px 7px 0 0;
+          .tree-row-on {
+            color: #3279e8;
+            font-weight: 600;
+          }
+      }
+    }
+    .box-top {
+      .box-top-form {
+        padding-left: 7px;
+        .el-form-item {
+          margin-bottom: 7px;
+        }
+      }
+      .box-top-gjl {
+        overflow: hidden;
+        padding: 7px 0 7px 7px;
+        border-top: 1px solid #ccc;
+      }
+    }
+    .box-bottom {
+      padding-left: 7px;
+    }
+
+    .el-table .el-table__row {
+      height: 35px;
+    }
+    .el-table__body .el-form-item--mini.el-form-item {
+      margin: 0px;
+      .error {
+        overflow: hidden;
+        color: #f56c6c;
+        font-size: 12px;
+        line-height: 1;
+      }
+    }
+  }
+  .color_no {
+    color: #7a7a7a;
+  }
+  .color_yes {
+    color: #1a9f17;
+  }
+}
+</style>

+ 4 - 4
src/views/systemInterface/components/getCorDas.vue

@@ -188,7 +188,7 @@
                     <el-table-column
                         sortable
                         prop="value"
-                        label="CorDas数据值"
+                        label="MOSAIC数据值"
                         width="110px"
                         :show-overflow-tooltip="true"
                     >
@@ -199,7 +199,7 @@
                     <el-table-column
                         sortable
                         prop="sourceType"
-                        label="CorDas数据位置"
+                        label="MOSAIC数据位置"
                         min-width="100px"
                         :show-overflow-tooltip="true"
                     ></el-table-column>
@@ -223,8 +223,8 @@
                     </el-table-column>
                     <el-table-column
                         sortable
-                        prop="bdesc1"
-                        label="das地址"
+                        prop="tagid"
+                        label="MOSAIC地址"
                         min-width="100px"
                         :show-overflow-tooltip="true"
                     ></el-table-column>

+ 15 - 1
src/views/systemInterface/router/index.js

@@ -17,7 +17,11 @@ import hbData from '../components/hbData.vue'
 // 能源监控数据展示
 import coreDasData from '../components/coreDasData.vue'
 // 消息推送日志
-import webSocketLog from '../components/webSocketLog.vue'
+import webSocketLog from '../components/webSocketLog.vue'
+// 大宗物料收发数据-实时
+import getDzMaterialReal from '../components/DzMaterial/getDzMaterialReal.vue'
+// 大宗物料收发数据
+import getDzMaterial from '../components/DzMaterial/getDzMaterial.vue'
 
 Vue.use(Router)
 
@@ -64,6 +68,16 @@ export default new Router({
                 path: 'webSocketLog',
                 name: 'webSocketLog',
                 component: webSocketLog
+            },
+            {
+              path: 'getDzMaterialReal',
+              name: 'getDzMaterialReal',
+              component: getDzMaterialReal
+            },
+            {
+              path: 'getDzMaterial',
+              name: 'getDzMaterial',
+              component: getDzMaterial
             }
         ]
     }]