فهرست منبع

Merge branch 'dev_v2' of ssh://gogs.zfire.top:2222/zfire-front/supply-front into loc

aXin-0810 2 سال پیش
والد
کامیت
f173225a09
4فایلهای تغییر یافته به همراه508 افزوده شده و 587 حذف شده
  1. 477 0
      src/components/NotifyBox/index.vue
  2. 7 1
      src/layout/components/AppMain.vue
  3. 24 268
      src/layout/components/Navbar.vue
  4. 0 318
      src/views/dashboard.vue

+ 477 - 0
src/components/NotifyBox/index.vue

@@ -0,0 +1,477 @@
+<template>
+  <el-dialog
+    title="消息"
+    :visible.sync="showMessages"
+    :append-to-body="true"
+    width="50%"
+    :show-close="false"
+    :close-on-click-modal="false"
+  >
+    <el-radio-group v-model="type" size="mini" @change="checkFn">
+      <el-radio-button :label="0">系统通知</el-radio-button>
+      <el-radio-button :label="1">文件下发</el-radio-button>
+      <el-radio-button :label="2">返利确认单</el-radio-button>
+      <el-radio-button :label="3">物流通知</el-radio-button>
+      <el-radio-button :label="4">到货通知</el-radio-button>
+    </el-radio-group>
+    <!-- 系统通知 -->
+    <div v-show="type === 0" class="table">
+      <el-table
+        ref="table"
+        v-loading="listLoading"
+        class="cql"
+        :data="dataList"
+        element-loading-text="Loading"
+        border
+        fit
+        highlight-current-row
+        stripe
+      >
+        <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="标题" prop="title" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="来源" prop="source" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="时间" prop="issueTime" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-button type="text" class="textColor" @click="lookInDialog(scope.row.id)">查看</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 文件下发 -->
+    <div v-show="type === 1" class="table">
+      <el-table
+        ref="table"
+        v-loading="listLoading"
+        :data="fileList"
+        element-loading-text="Loading"
+        border
+        fit
+        highlight-current-row
+        stripe
+      >
+        <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="标题" prop="title" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="来源" prop="operatorNickName" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="时间" prop="createTime" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-button type="text" class="textColor" @click="downloadFn(scope.row.id)">下载</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 返利确认单 -->
+    <div v-show="type === 2" class="table">
+      <el-table
+        ref="table"
+        v-loading="listLoading"
+        :data="rebateList"
+        element-loading-text="Loading"
+        border
+        fit
+        highlight-current-row
+        stripe
+      >
+        <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="经销商名称" prop="customerName" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="确认人" prop="examineBy" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="确认时间" prop="examineTime" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-button type="text" class="textColor" @click="secondFn(scope.row.rebateOrderId)">{{
+              isCustomer ? '确认' : '复核'
+            }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 物流通知 -->
+    <div v-show="type === 3" class="table">
+      <el-table
+        ref="table"
+        v-loading="listLoading"
+        :data="invoiceOrderList"
+        element-loading-text="Loading"
+        border
+        fit
+        highlight-current-row
+        stripe
+      >
+        <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="发货单" prop="id" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-link v-if="!isCustomer" type="primary" :underline="false" @click="handleJump(scope.row.id)">{{
+              scope.row.id
+            }}</el-link>
+            <template v-else>{{ scope.row.id }}</template>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="内容" prop="orderTrackStatus" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="时间" prop="orderTrackTime" min-width="160" show-overflow-tooltip />
+        <el-table-column align="center" label="收货地址" prop="address" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ scope.row.address ? scope.row.address : '——' }}
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="收货客户" prop="receivingName" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">{{ scope.row.receivingName ? scope.row.receivingName : '——' }}</template>
+        </el-table-column>
+        <el-table-column align="center" label="" min-width="80" show-overflow-tooltip fixed="right">
+          <template slot-scope="scope">
+            <el-button type="text" class="textColor" @click="handLogistics(scope.row)">查看</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!-- 到货通知 -->
+    <div v-show="type == 4" class="table">
+      <div class="mymain-container">
+        <el-form ref="form" label-width="80px" label-position="left" size="mini">
+          <el-row>
+            <el-col>
+              <el-form-item prop="specification" label="规格型号">
+                <div style="display: flex">
+                  <el-input v-model="specification" clearable style="margin-right: 10px" />
+                  <el-button
+                    @click="
+                      specification = ''
+                      getListInvoiceOrder()
+                    "
+                    >重置</el-button
+                  >
+                  <el-button type="primary" @click="getArrivalNotice">查询</el-button>
+                </div>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <div class="table">
+          <el-table
+            ref="table"
+            v-loading="listLoading"
+            :data="arrivalNoticeList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column
+              property="materialOldNumber"
+              align="left"
+              min-width="120"
+              label="产品编号"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              property="materialNumber"
+              align="left"
+              min-width="100"
+              label="物料编码"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              property="materialName"
+              align="left"
+              min-width="250"
+              label="产品名称"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              property="specification"
+              align="left"
+              min-width="350"
+              label="规格型号"
+              show-overflow-tooltip
+            />
+            <el-table-column property="stockName" align="left" min-width="100" label="到货仓库" show-overflow-tooltip />
+            <el-table-column
+              property="updateTime"
+              align="left"
+              min-width="200"
+              label="到货通知时间"
+              show-overflow-tooltip
+            />
+          </el-table>
+        </div>
+      </div>
+    </div>
+    <!-- 分页 -->
+    <div class="fr">
+      <el-pagination
+        :current-page="currentPage"
+        :page-sizes="[10, 20, 30, 50]"
+        :page-size="10"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="listTotal"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+    </div>
+    <!-- 内层弹窗 -->
+    <el-dialog width="40%" title="消息标题" :visible.sync="inDialog" append-to-body>
+      <div class="detail-container">
+        <div class="title">{{ detailData.title }}</div>
+        <div class="text">
+          发布人:{{ detailData.issueNickName }}<el-divider direction="vertical" />发布时间:{{ detailData.issueTime }}
+        </div>
+        <el-divider />
+        <div class="content">{{ detailData.content }}</div>
+        <el-divider v-if="detailData.files && detailData.files.length > 0" />
+        <div v-if="detailData.files && detailData.files.length > 0" class="file">
+          <div>附件:</div>
+          <div class="file-list">
+            <div v-for="(item, index) in detailData.files" :key="index" class="item">
+              <el-image
+                v-if="checkFileType(item.url) == 'image'"
+                class="img"
+                :src="imageURL + item.url"
+                :preview-src-list="[imageURL + item.url]"
+              />
+              <div v-else class="box2" @click="openLink(item.url)">
+                <img v-if="checkFileType(item.url) == 'word'" src="@/assets/common/word.png" />
+                <img v-if="checkFileType(item.url) == 'excel'" src="@/assets/common/excel.png" />
+                <img v-if="checkFileType(item.url) == 'ppt'" src="@/assets/common/ppt.png" />
+                <img v-if="checkFileType(item.url) == 'pdf'" src="@/assets/common/pdf.png" />
+                <div class="name ellipsis-3">{{ item.name }}</div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button size="mini" type="primary" @click="confirmCheck(detailData.noticeId)">确认接收</el-button>
+        <el-button size="mini" @click="inDialog = false">关 闭</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog
+      title="物流信息"
+      :visible.sync="visible"
+      width="60%"
+      append-to-body
+      :close-on-click-modal="false"
+      @close="onClose"
+    >
+      <el-timeline v-if="logisticsDetail.length" class="logistics" :reverse="false">
+        <el-timeline-item
+          v-for="(item, index) in logisticsDetail"
+          :key="index"
+          placement="top"
+          type="success"
+          :timestamp="item.time"
+        >
+          <el-row :gutter="20">
+            <el-col class="logistics-title"> {{ item.status }} </el-col>
+            <el-col>
+              <div class="flex">
+                <div>{{ item.context }}</div>
+                <!-- <div>{{ item.createTime }}</div> -->
+              </div>
+            </el-col>
+          </el-row>
+        </el-timeline-item>
+      </el-timeline>
+      <div v-else class="tip">暂无物流信息</div>
+    </el-dialog>
+    <div slot="footer" class="dialog-footer">
+      <el-button type="primary" size="mini" @click="closeFn">关闭</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { mapGetters } from 'vuex'
+import {
+  getNoticeList,
+  getComListList,
+  getComListDownload,
+  getNoticeDetail,
+  confirmCheck,
+  getRebateOrderList,
+  getListInvoiceOrder
+} from '@/api/dashboard'
+import { getArrivalNotice } from '@/api/stock'
+import { getListOrderTrack } from '@/api/supply/pickup'
+import { getFileUrl } from '@/api/common'
+export default {
+  data() {
+    return {
+      imageURL: this.$imageUrl,
+      type: 0,
+      currentPage: 1,
+      pageSize: 10,
+      listTotal: 0,
+      dataList: [],
+      listLoading: false,
+      fileList: [],
+      inDialog: false,
+      detailData: [],
+      rebateList: [],
+      invoiceOrderList: [],
+      visible: false,
+      orderId: '',
+      logisticsDetail: [],
+      arrivalNoticeList: [],
+      specification: '',
+      fnArr: ['getDataList', 'getFileList', 'getRebateList', 'getListInvoiceOrder', 'getListInvoiceOrder']
+    }
+  },
+  computed: {
+    ...mapGetters(['showMessages', 'isCustomer'])
+  },
+  created() {
+    this[this.fnArr[this.type]]()
+  },
+  methods: {
+    checkFn(i) {
+      this[this.fnArr[i]]()
+    },
+    // 获取文件列表数据
+    async getFileList() {
+      const data = {
+        needDown: true,
+        pageSize: this.pageSize,
+        pageNo: this.currentPage
+      }
+      const res = await getComListList(data)
+      this.fileList = res.data.records
+      this.listTotal = res.data.total
+    },
+    // 获取返利确认单数据
+    async getRebateList() {
+      const data = {
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        isSecondExamine: false
+      }
+      const res = await getRebateOrderList(data)
+      this.rebateList = res.data.records
+      this.listTotal = res.data.total
+    },
+    // 获取列表数据
+    async getDataList() {
+      const data = {
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        readFlag: false
+      }
+      const res = await getNoticeList(data)
+      console.log(res)
+      this.dataList = res.data.records
+      this.listTotal = res.data.total
+    },
+    // 获取物流列表
+    async getListInvoiceOrder() {
+      const data = {
+        pageSize: this.pageSize,
+        pageNum: this.currentPage
+      }
+      const res = await getListInvoiceOrder(data)
+      this.invoiceOrderList = res.data.records
+      this.listTotal = res.data.total
+    },
+    async getArrivalNotice() {
+      const data = {
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        specification: this.specification
+      }
+      const res = await getArrivalNotice(data)
+      this.arrivalNoticeList = res.data.records
+      this.listTotal = res.data.total
+    },
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.currentPage = 1
+      this[this.fnArr[this.type]]()
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val
+      this[this.fnArr[this.type]]()
+    },
+    openLink(url) {
+      getFileUrl({ key: url }).then(res => {
+        window.open(res.data)
+      })
+    },
+    // 复核
+    secondFn(id) {
+      this.$router.push({
+        path: '/finance/rebate_list',
+        query: {
+          id
+        }
+      })
+      this.type = 0
+      this.$store.commit('user/showMessage', 'no')
+    },
+    // 确认查收
+    confirmCheck(id) {
+      confirmCheck({ noticeIds: id }).then(res => {
+        this.$successMsg('查收成功')
+        this.inDialog = false
+        this[this.fnArr[this.type]]()
+      })
+    },
+    // 检查文件类型
+    checkFileType(url) {
+      if (!url) return ''
+      const fileSuffix = url.substring(url.lastIndexOf('.') + 1)
+
+      if (['jpg', 'jpeg', 'png'].includes(fileSuffix)) {
+        return 'image'
+      } else if (['doc', 'docx', 'dot', 'wps', 'wpt'].includes(fileSuffix)) {
+        return 'word'
+      } else if (['xls', 'xlsx', 'xlt', 'et', 'ett'].includes(fileSuffix)) {
+        return 'excel'
+      } else if (['ppt', 'pptx', 'dps', 'dpt', 'pot', 'pps'].includes(fileSuffix)) {
+        return 'ppt'
+      } else if (['pdf'].includes(fileSuffix)) {
+        return 'pdf'
+      } else {
+        return ''
+      }
+    },
+    // 查看
+    async lookInDialog(id) {
+      const res = await getNoticeDetail({ id })
+      this.detailData = res.data
+      this.inDialog = true
+    },
+    // 下载
+    async downloadFn(id) {
+      const res = await getComListDownload({ id })
+      if (res.data) {
+        window.open(this.imageURL + res.data)
+      }
+    },
+    // 关闭
+    closeFn() {
+      this.type = 0
+      this.$store.commit('user/showMessage', 'no')
+    },
+    handLogistics(row) {
+      getListOrderTrack({ orderId: row.id }).then(res => {
+        this.logisticsDetail = res.data
+      })
+      this.orderId = row.id
+      this.visible = true
+    },
+    onClose() {
+      this.logisticsDetail = []
+      this.orderId = ''
+      this.visible = false
+    },
+    handleJump(id) {
+      this.$router.push({ path: `/supply/pickup/sum_list?id=${id}` })
+      this.type = 0
+      this.$store.commit('user/showMessage', 'no')
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 7 - 1
src/layout/components/AppMain.vue

@@ -7,7 +7,9 @@
         </keep-alive>
         <router-view v-else />
       </transition>
-      <zj-watermark color="rgba(200,200,200,.3)" position="absolute" :str="str" zIndex="99" />
+      <!-- 通知框 -->
+      <notify-box />
+      <zj-watermark color="rgba(200,200,200,.3)" position="absolute" :str="str" z-index="99" />
     </div>
   </section>
 </template>
@@ -15,8 +17,12 @@
 <script>
 import { mapGetters } from 'vuex'
 import { setModuleId } from '@/utils/request'
+import NotifyBox from '@/components/NotifyBox'
 export default {
   name: 'AppMain',
+  components: {
+    NotifyBox
+  },
   computed: {
     ...mapGetters(['show']),
     cachedViews() {

+ 24 - 268
src/layout/components/Navbar.vue

@@ -16,9 +16,9 @@
           ></i>
         </el-tooltip>
       </div> -->
-      <div class="right-menu-item" style="display: flex" v-if="isHongGe">
+      <div v-if="isHongGe" class="right-menu-item" style="display: flex">
         <el-select v-model="changeNum" filterable :disabled="!isHongGe" @change="handleChangeArea">
-          <el-option v-for="item in areaOpti" :key="item.value" :label="item.label" :value="item.value"> </el-option>
+          <el-option v-for="item in areaOpti" :key="item.value" :label="item.label" :value="item.value" />
         </el-select>
       </div>
       <!-- <div class="right-menu-item hover-effect" style="display: flex" @click="handleShow">
@@ -27,7 +27,7 @@
         </el-badge>
         <span style="font-size: 16px; margin-left: 15px">物流通知</span>
       </div> -->
-      <div class="right-menu-item hover-effect" style="display: flex" @click="handleNotice('click')">
+      <div class="right-menu-item hover-effect" style="display: flex" @click="handleNotice">
         <el-badge value="示">
           <i class="el-icon-message-solid" style="font-size: 24px; line-height: 50px" />
         </el-badge>
@@ -78,240 +78,6 @@
         <el-button type="primary" @click="submitForm">确 定</el-button>
       </div>
     </el-dialog>
-
-    <el-dialog
-      title="到货通知"
-      :modal="false"
-      width="70%"
-      :visible.sync="hasNotice"
-      :append-to-body="true"
-      @close="handleNotice(false)"
-    >
-      <div style="margin-top: 20px">
-        <el-radio-group v-model="noticeType" size="mini" @change="handleChangeNotice">
-          <el-radio-button :label="1">物流通知</el-radio-button>
-          <el-radio-button :label="2">到货通知</el-radio-button>
-        </el-radio-group>
-      </div>
-      <div v-show="noticeType === 2" class="mymain-container">
-        <el-form ref="form" :model="form" label-width="80px" label-position="left" size="mini">
-          <el-row>
-            <el-col>
-              <el-form-item prop="specification" label="规格型号">
-                <div style="display: flex">
-                  <el-input v-model="form.specification" clearable style="margin-right: 10px" />
-                  <el-button
-                    @click="
-                      form.specification = ''
-                      getNoticeList()
-                    "
-                    >重置</el-button
-                  >
-                  <el-button type="primary" @click="getNoticeLists">查询</el-button>
-                </div>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
-        <div class="table">
-          <el-table v-loading="listLoading" :data="noticeList" border>
-            <el-table-column
-              property="materialOldNumber"
-              align="left"
-              min-width="120"
-              label="产品编号"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              property="materialNumber"
-              align="left"
-              min-width="100"
-              label="物料编码"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              property="materialName"
-              align="left"
-              min-width="250"
-              label="产品名称"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              property="specification"
-              align="left"
-              min-width="350"
-              label="规格型号"
-              show-overflow-tooltip
-            />
-            <el-table-column property="stockName" align="left" min-width="100" label="到货仓库" show-overflow-tooltip />
-            <el-table-column
-              property="updateTime"
-              align="left"
-              min-width="200"
-              label="到货通知时间"
-              show-overflow-tooltip
-            />
-          </el-table>
-          <div class="flex">
-            <div />
-            <div class="fr">
-              <el-pagination
-                :current-page="currentPage2"
-                :page-sizes="[10, 20, 30, 50]"
-                :page-size="10"
-                layout="total, prev, pager, next"
-                :total="listTotal2"
-                @size-change="handleSizeChange2"
-                @current-change="handleCurrentChange2"
-              />
-            </div>
-          </div>
-        </div>
-      </div>
-      <div v-show="noticeType === 1" class="mymain-container">
-        <div class="table">
-          <el-table
-            ref="table"
-            v-loading="listLoading"
-            :data="invoiceOrderList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            stripe
-          >
-            <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
-            <el-table-column align="center" label="发货单" prop="id" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <el-link v-if="!isCustomer" type="primary" :underline="false" @click="handleJump(scope.row.id)">{{
-                  scope.row.id
-                }}</el-link>
-                <template v-else>{{ scope.row.id }}</template>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="center"
-              label="内容"
-              prop="orderTrackStatus"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column align="center" label="时间" prop="orderTrackTime" min-width="160" show-overflow-tooltip />
-            <el-table-column align="center" label="收货地址" prop="address" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.address ? scope.row.address : '——' }}
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="收货客户" prop="receivingName" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">{{ scope.row.receivingName ? scope.row.receivingName : '——' }}</template>
-            </el-table-column>
-            <el-table-column align="center" label="" min-width="80" show-overflow-tooltip fixed="right">
-              <template slot-scope="scope">
-                <el-button type="text" class="textColor" @click="handLogistics(scope.row)">查看</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-          <!-- 分页 -->
-          <div class="flex">
-            <div></div>
-            <div class="fr">
-              <el-pagination
-                :current-page="currentPage"
-                :page-sizes="[10, 20, 30, 50]"
-                :page-size="10"
-                layout="total, sizes, prev, pager, next, jumper"
-                :total="listTotal"
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-              />
-            </div>
-          </div>
-        </div>
-      </div>
-    </el-dialog>
-    <!-- <el-dialog title="物流通知" :visible.sync="isLogistics" width="60%" :modal="true" @close="isLogistics = false">
-      <div class="table">
-        <el-table
-          ref="table"
-          v-loading="listLoading"
-          :data="invoiceOrderList"
-          element-loading-text="Loading"
-          border
-          fit
-          highlight-current-row
-          stripe
-        >
-          <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="发货单" prop="id" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <el-link v-if="!isCustomer" type="primary" :underline="false" @click="handleJump(scope.row.id)">{{
-                scope.row.id
-              }}</el-link>
-              <template v-else>{{ scope.row.id }}</template>
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="内容" prop="orderTrackStatus" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="时间" prop="orderTrackTime" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="收货地址" prop="address" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.address ? scope.row.address : '——' }}
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="收货客户" prop="receivingName" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">{{ scope.row.receivingName ? scope.row.receivingName : '——' }}</template>
-          </el-table-column>
-          <el-table-column align="center" label="" min-width="80" show-overflow-tooltip fixed="right">
-            <template slot-scope="scope">
-              <el-button type="text" class="textColor" @click="handLogistics(scope.row)">查看</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-    
-      <div class="fr">
-        <el-pagination
-          :current-page="currentPage"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
-      </div>
-      <br />
-      <br />
-    </el-dialog> -->
-    <el-dialog
-      title="物流到货通知"
-      :visible.sync="visible"
-      width="60%"
-      @close="onClose"
-      :modal="false"
-      :close-on-click-modal="false"
-      :append-to-body="true"
-    >
-      <el-timeline class="logistics" :reverse="false" v-if="logisticsDetail.length">
-        <el-timeline-item
-          placement="top"
-          type="success"
-          v-for="(item, index) in logisticsDetail"
-          :key="index"
-          :timestamp="item.time"
-        >
-          <el-row :gutter="20">
-            <el-col class="logistics-title"> {{ item.status }} </el-col>
-            <el-col>
-              <div class="flex">
-                <div>{{ item.context }}</div>
-                <!-- <div>{{ item.createTime }}</div> -->
-              </div>
-            </el-col>
-          </el-row>
-        </el-timeline-item>
-      </el-timeline>
-      <div v-else class="tip">暂无物流信息</div>
-    </el-dialog>
     <!--    工程机多帐号-->
     <!--    <el-dialog-->
     <!--      title="绑定工程机系统"-->
@@ -381,6 +147,7 @@ export default {
     Breadcrumb,
     Hamburger,
     Screenfull,
+    // eslint-disable-next-line vue/no-unused-components
     NavMenu
   },
   mixins: [mixin],
@@ -431,7 +198,14 @@ export default {
     }
   },
   mounted() {
-    const that = this
+    // 浏览器不同标签页监听
+    // window.addEventListener('storage', event => {
+    //   if (event.key === 'user_auto_num') {
+    //       this.$router.go(0)
+    //   }
+    // })
+    this.changeNum = this.autoChangeNum
+    // const that = this
     // 开定时器轮询未读消息接口(写在全局vuex里比较好)
     // that.initNotice();
     // that.tcMessage();
@@ -452,6 +226,7 @@ export default {
     window.clearInterval(this.timer)
     this.websocketOnclose()
   },
+  // eslint-disable-next-line vue/order-in-components
   computed: {
     showBreadcrumb() {
       return this.$store.state.settings.breadcrumb
@@ -477,16 +252,7 @@ export default {
     },
     ...mapGetters(['sidebar', 'avatar', 'device', 'name', 'isNotice', 'isCustomer', 'isHongGe', 'autoChangeNum'])
   },
-  mounted() {
-    // 浏览器不同标签页监听
-    // window.addEventListener('storage', event => {
-    //   if (event.key === 'user_auto_num') {
-    //       this.$router.go(0)
-    //   }
-    // })
-    this.changeNum = this.autoChangeNum
- 
-  },
+
   methods: {
     getList() {
       // this.getNoticeList()
@@ -542,20 +308,8 @@ export default {
         // this.listLoading = false
       })
     },
-    handleNotice(flag = true) {
-      if (flag || flag == 'click') {
-        if (flag == 'click') {
-          this.myType = flag
-        }
-        this.getListInvoiceOrder()
-        this.$store.commit('user/SET_STATUS', true)
-      } else {
-        if (!flag) {
-          this.myType = ''
-        }
-        this.noticeType = 1
-        this.$store.commit('user/SET_STATUS', false)
-      }
+    handleNotice() {
+      this.$store.commit('user/showMessage', 'yes')
     },
     toggleSideBar() {
       this.$store.dispatch('app/toggleSideBar')
@@ -707,7 +461,7 @@ export default {
     //     this.engineForm.engineList.splice(index, 1)
     //   }
     // }
-    initWebSocket: function () {
+    initWebSocket: function() {
       // WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
       // var userId = this.$store.getters.userid;
       //
@@ -720,12 +474,12 @@ export default {
       // this.websock.onmessage = this.websocketOnmessage;
       // this.websock.onclose = this.websocketOnclose;
     },
-    websocketOnopen: function () {
+    websocketOnopen: function() {
       console.debug('WebSocket连接成功')
       // 心跳检测重置
       // this.heartCheck.reset().start();
     },
-    websocketOnerror: function (e) {
+    websocketOnerror: function(e) {
       console.debug('WebSocket连接发生错误,第%s次', this.wsConnectErrorTime)
 
       this.wsConnectErrorTime = this.wsConnectErrorTime + 1
@@ -737,13 +491,15 @@ export default {
 
       this.reconnect()
     },
-    websocketOnmessage: function (e) {
+    websocketOnmessage: function(e) {
       console.debug('-----接收消息-------', e.data)
+      // eslint-disable-next-line no-eval
       const data = eval('(' + e.data + ')') // 解析对象
       if (data.type === 'RebateOrderMsg') {
         if (data.res.hasMessage) {
           this.$notify.info({
             title: '消息',
+            // eslint-disable-next-line no-undef
             message: res.data.messages,
             position: 'bottom-right',
             duration: 4000,
@@ -752,7 +508,7 @@ export default {
         }
       }
     },
-    websocketOnclose: function (e) {
+    websocketOnclose: function(e) {
       console.debug('connection closed (' + e + ')')
       if (e) {
         console.debug('connection closed (' + e.code + ')')
@@ -772,7 +528,7 @@ export default {
       if (that.lockReconnect) return
       that.lockReconnect = true
       // 没连接上会一直重连,设置延迟避免请求过多
-      setTimeout(function () {
+      setTimeout(function() {
         console.debug('尝试重连...')
         that.initWebSocket()
         that.lockReconnect = false

+ 0 - 318
src/views/dashboard.vue

@@ -71,317 +71,6 @@
           <el-button type="primary" @click="handleSaveMenu">确 定</el-button>
         </span>
       </el-dialog>
-
-      <el-dialog
-        title="消息"
-        :visible.sync="showMessages"
-        :append-to-body="true"
-        width="50%"
-        :show-close="false"
-        :close-on-click-modal="false"
-      >
-        <el-radio-group v-model="type" size="mini" @change="checkFn">
-          <el-radio-button label="1">系统通知</el-radio-button>
-          <el-radio-button label="2">文件下发</el-radio-button>
-          <el-radio-button label="3">返利确认单</el-radio-button>
-          <el-radio-button label="4">物流通知</el-radio-button>
-          <el-radio-button label="5">到货通知</el-radio-button>
-        </el-radio-group>
-        <br />
-        <br />
-        <!-- 系统通知 -->
-        <div v-show="type == '1'" class="table">
-          <el-table
-            ref="table"
-            v-loading="listLoading"
-            class="cql"
-            :data="dataList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            stripe
-          >
-            <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
-            <el-table-column align="center" label="标题" prop="title" min-width="160" show-overflow-tooltip />
-            <el-table-column align="center" label="来源" prop="source" min-width="160" show-overflow-tooltip />
-            <el-table-column align="center" label="时间" prop="issueTime" min-width="160" show-overflow-tooltip />
-            <el-table-column align="center" label="" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <el-button type="text" class="textColor" @click="lookInDialog(scope.row.id)">查看</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-        <!-- 文件下发 -->
-        <div v-show="type == '2'" class="table">
-          <el-table
-            ref="table"
-            v-loading="listLoading"
-            :data="fileList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            stripe
-          >
-            <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
-            <el-table-column align="center" label="标题" prop="title" min-width="160" show-overflow-tooltip />
-            <el-table-column
-              align="center"
-              label="来源"
-              prop="operatorNickName"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column align="center" label="时间" prop="createTime" min-width="160" show-overflow-tooltip />
-            <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <el-button type="text" class="textColor" @click="downloadFn(scope.row.id)">下载</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-        <!-- 返利确认单 -->
-        <div v-show="type == '3'" class="table">
-          <el-table
-            ref="table"
-            v-loading="listLoading"
-            :data="rebateList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            stripe
-          >
-            <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
-            <el-table-column
-              align="center"
-              label="经销商名称"
-              prop="customerName"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column align="center" label="确认人" prop="examineBy" min-width="160" show-overflow-tooltip />
-            <el-table-column align="center" label="确认时间" prop="examineTime" min-width="160" show-overflow-tooltip />
-            <el-table-column align="center" label="" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <el-button type="text" class="textColor" @click="secondFn(scope.row.rebateOrderId)">{{
-                  isCustomer ? '确认' : '复核'
-                }}</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-        <!-- 物流通知 -->
-        <div v-show="type == '4'" class="table">
-          <el-table
-            ref="table"
-            v-loading="listLoading"
-            :data="invoiceOrderList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            stripe
-          >
-            <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
-            <el-table-column align="center" label="发货单" prop="id" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <el-link v-if="!isCustomer" type="primary" :underline="false" @click="handleJump(scope.row.id)">{{
-                  scope.row.id
-                }}</el-link>
-                <template v-else>{{ scope.row.id }}</template>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="center"
-              label="内容"
-              prop="orderTrackStatus"
-              min-width="160"
-              show-overflow-tooltip
-            />
-            <el-table-column align="center" label="时间" prop="orderTrackTime" min-width="160" show-overflow-tooltip />
-            <el-table-column align="center" label="收货地址" prop="address" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.address ? scope.row.address : '——' }}
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="收货客户" prop="receivingName" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">{{ scope.row.receivingName ? scope.row.receivingName : '——' }}</template>
-            </el-table-column>
-            <el-table-column align="center" label="" min-width="80" show-overflow-tooltip fixed="right">
-              <template slot-scope="scope">
-                <el-button type="text" class="textColor" @click="handLogistics(scope.row)">查看</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-        <!-- 到货通知 -->
-        <div v-show="type == '5'" class="table">
-          <div class="mymain-container">
-            <el-form ref="form" label-width="80px" label-position="left" size="mini">
-              <el-row>
-                <el-col>
-                  <el-form-item prop="specification" label="规格型号">
-                    <div style="display: flex">
-                      <el-input v-model="specification" clearable style="margin-right: 10px" />
-                      <el-button
-                        @click="
-                          specification = ''
-                          getListInvoiceOrder()
-                        "
-                        >重置</el-button
-                      >
-                      <el-button type="primary" @click="getArrivalNotice">查询</el-button>
-                    </div>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-            </el-form>
-            <div class="table">
-              <el-table
-                ref="table"
-                v-loading="listLoading"
-                :data="arrivalNoticeList"
-                element-loading-text="Loading"
-                border
-                fit
-                highlight-current-row
-                stripe
-              >
-                <el-table-column
-                  property="materialOldNumber"
-                  align="left"
-                  min-width="120"
-                  label="产品编号"
-                  show-overflow-tooltip
-                />
-                <el-table-column
-                  property="materialNumber"
-                  align="left"
-                  min-width="100"
-                  label="物料编码"
-                  show-overflow-tooltip
-                />
-                <el-table-column
-                  property="materialName"
-                  align="left"
-                  min-width="250"
-                  label="产品名称"
-                  show-overflow-tooltip
-                />
-                <el-table-column
-                  property="specification"
-                  align="left"
-                  min-width="350"
-                  label="规格型号"
-                  show-overflow-tooltip
-                />
-                <el-table-column
-                  property="stockName"
-                  align="left"
-                  min-width="100"
-                  label="到货仓库"
-                  show-overflow-tooltip
-                />
-                <el-table-column
-                  property="updateTime"
-                  align="left"
-                  min-width="200"
-                  label="到货通知时间"
-                  show-overflow-tooltip
-                />
-              </el-table>
-            </div>
-          </div>
-        </div>
-        <br />
-        <br />
-        <!-- 分页 -->
-        <div class="fr">
-          <el-pagination
-            :current-page="currentPage"
-            :page-sizes="[10, 20, 30, 50]"
-            :page-size="10"
-            layout="total, sizes, prev, pager, next, jumper"
-            :total="listTotal"
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-          />
-        </div>
-        <br /><br />
-        <!-- 内层弹窗 -->
-        <el-dialog width="40%" title="消息标题" :visible.sync="inDialog" append-to-body>
-          <div class="detail-container">
-            <div class="title">{{ detailData.title }}</div>
-            <div class="text">
-              发布人:{{ detailData.issueNickName }}<el-divider direction="vertical" />发布时间:{{
-                detailData.issueTime
-              }}
-            </div>
-            <el-divider />
-            <div class="content">{{ detailData.content }}</div>
-            <el-divider v-if="detailData.files && detailData.files.length > 0" />
-            <div v-if="detailData.files && detailData.files.length > 0" class="file">
-              <div>附件:</div>
-              <div class="file-list">
-                <div v-for="(item, index) in detailData.files" :key="index" class="item">
-                  <el-image
-                    v-if="checkFileType(item.url) == 'image'"
-                    class="img"
-                    :src="imageURL + item.url"
-                    :preview-src-list="[imageURL + item.url]"
-                  />
-                  <div v-else class="box2" @click="openLink(item.url)">
-                    <img v-if="checkFileType(item.url) == 'word'" src="@/assets/common/word.png" />
-                    <img v-if="checkFileType(item.url) == 'excel'" src="@/assets/common/excel.png" />
-                    <img v-if="checkFileType(item.url) == 'ppt'" src="@/assets/common/ppt.png" />
-                    <img v-if="checkFileType(item.url) == 'pdf'" src="@/assets/common/pdf.png" />
-                    <div class="name ellipsis-3">{{ item.name }}</div>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-          <div slot="footer" class="dialog-footer">
-            <el-button size="mini" type="primary" @click="confirmCheck(detailData.noticeId)">确认接收</el-button>
-            <el-button size="mini" @click="inDialog = false">关 闭</el-button>
-          </div>
-        </el-dialog>
-        <div slot="footer" class="dialog-footer">
-          <el-button type="primary" size="mini" @click="closeFn">关闭</el-button>
-        </div>
-      </el-dialog>
-      <el-dialog
-        title="物流信息"
-        :visible.sync="visible"
-        width="60%"
-        @close="onClose"
-        append-to-body
-        :close-on-click-modal="false"
-      >
-        <el-timeline class="logistics" :reverse="false" v-if="logisticsDetail.length">
-          <el-timeline-item
-            placement="top"
-            type="success"
-            v-for="(item, index) in logisticsDetail"
-            :key="index"
-            :timestamp="item.time"
-          >
-            <el-row :gutter="20">
-              <el-col class="logistics-title"> {{ item.status }} </el-col>
-              <el-col>
-                <div class="flex">
-                  <div>{{ item.context }}</div>
-                  <!-- <div>{{ item.createTime }}</div> -->
-                </div>
-              </el-col>
-            </el-row>
-          </el-timeline-item>
-        </el-timeline>
-        <div v-else class="tip">暂无物流信息</div>
-      </el-dialog>
     </div>
   </popu>
 </template>
@@ -411,12 +100,6 @@ export default {
     popu
   },
   created() {
-    this.getDataList({
-      pageSize: this.pageSize,
-      pageNum: this.currentPage,
-      readFlag: false
-    })
-
     getRouter({
       flag: 'index',
       adminUserId: this.userid
@@ -636,7 +319,6 @@ export default {
     },
     // 获取物流列表
     async getListInvoiceOrder(data) {
-    
       const res = await getListInvoiceOrder(data)
       this.invoiceOrderList = res.data.records
       this.listTotal = res.data.total