|
@@ -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>
|