|
@@ -16,9 +16,9 @@
|
|
></i>
|
|
></i>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</div> -->
|
|
</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-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>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<!-- <div class="right-menu-item hover-effect" style="display: flex" @click="handleShow">
|
|
<!-- <div class="right-menu-item hover-effect" style="display: flex" @click="handleShow">
|
|
@@ -27,7 +27,7 @@
|
|
</el-badge>
|
|
</el-badge>
|
|
<span style="font-size: 16px; margin-left: 15px">物流通知</span>
|
|
<span style="font-size: 16px; margin-left: 15px">物流通知</span>
|
|
</div> -->
|
|
</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="示">
|
|
<el-badge value="示">
|
|
<i class="el-icon-message-solid" style="font-size: 24px; line-height: 50px" />
|
|
<i class="el-icon-message-solid" style="font-size: 24px; line-height: 50px" />
|
|
</el-badge>
|
|
</el-badge>
|
|
@@ -78,240 +78,6 @@
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</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-->
|
|
<!-- <el-dialog-->
|
|
<!-- title="绑定工程机系统"-->
|
|
<!-- title="绑定工程机系统"-->
|
|
@@ -381,6 +147,7 @@ export default {
|
|
Breadcrumb,
|
|
Breadcrumb,
|
|
Hamburger,
|
|
Hamburger,
|
|
Screenfull,
|
|
Screenfull,
|
|
|
|
+ // eslint-disable-next-line vue/no-unused-components
|
|
NavMenu
|
|
NavMenu
|
|
},
|
|
},
|
|
mixins: [mixin],
|
|
mixins: [mixin],
|
|
@@ -431,7 +198,14 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
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里比较好)
|
|
// 开定时器轮询未读消息接口(写在全局vuex里比较好)
|
|
// that.initNotice();
|
|
// that.initNotice();
|
|
// that.tcMessage();
|
|
// that.tcMessage();
|
|
@@ -452,6 +226,7 @@ export default {
|
|
window.clearInterval(this.timer)
|
|
window.clearInterval(this.timer)
|
|
this.websocketOnclose()
|
|
this.websocketOnclose()
|
|
},
|
|
},
|
|
|
|
+ // eslint-disable-next-line vue/order-in-components
|
|
computed: {
|
|
computed: {
|
|
showBreadcrumb() {
|
|
showBreadcrumb() {
|
|
return this.$store.state.settings.breadcrumb
|
|
return this.$store.state.settings.breadcrumb
|
|
@@ -477,16 +252,7 @@ export default {
|
|
},
|
|
},
|
|
...mapGetters(['sidebar', 'avatar', 'device', 'name', 'isNotice', 'isCustomer', 'isHongGe', 'autoChangeNum'])
|
|
...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: {
|
|
methods: {
|
|
getList() {
|
|
getList() {
|
|
// this.getNoticeList()
|
|
// this.getNoticeList()
|
|
@@ -542,20 +308,8 @@ export default {
|
|
// this.listLoading = false
|
|
// 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() {
|
|
toggleSideBar() {
|
|
this.$store.dispatch('app/toggleSideBar')
|
|
this.$store.dispatch('app/toggleSideBar')
|
|
@@ -707,7 +461,7 @@ export default {
|
|
// this.engineForm.engineList.splice(index, 1)
|
|
// this.engineForm.engineList.splice(index, 1)
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
- initWebSocket: function () {
|
|
|
|
|
|
+ initWebSocket: function() {
|
|
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
|
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
|
// var userId = this.$store.getters.userid;
|
|
// var userId = this.$store.getters.userid;
|
|
//
|
|
//
|
|
@@ -720,12 +474,12 @@ export default {
|
|
// this.websock.onmessage = this.websocketOnmessage;
|
|
// this.websock.onmessage = this.websocketOnmessage;
|
|
// this.websock.onclose = this.websocketOnclose;
|
|
// this.websock.onclose = this.websocketOnclose;
|
|
},
|
|
},
|
|
- websocketOnopen: function () {
|
|
|
|
|
|
+ websocketOnopen: function() {
|
|
console.debug('WebSocket连接成功')
|
|
console.debug('WebSocket连接成功')
|
|
// 心跳检测重置
|
|
// 心跳检测重置
|
|
// this.heartCheck.reset().start();
|
|
// this.heartCheck.reset().start();
|
|
},
|
|
},
|
|
- websocketOnerror: function (e) {
|
|
|
|
|
|
+ websocketOnerror: function(e) {
|
|
console.debug('WebSocket连接发生错误,第%s次', this.wsConnectErrorTime)
|
|
console.debug('WebSocket连接发生错误,第%s次', this.wsConnectErrorTime)
|
|
|
|
|
|
this.wsConnectErrorTime = this.wsConnectErrorTime + 1
|
|
this.wsConnectErrorTime = this.wsConnectErrorTime + 1
|
|
@@ -737,13 +491,15 @@ export default {
|
|
|
|
|
|
this.reconnect()
|
|
this.reconnect()
|
|
},
|
|
},
|
|
- websocketOnmessage: function (e) {
|
|
|
|
|
|
+ websocketOnmessage: function(e) {
|
|
console.debug('-----接收消息-------', e.data)
|
|
console.debug('-----接收消息-------', e.data)
|
|
|
|
+ // eslint-disable-next-line no-eval
|
|
const data = eval('(' + e.data + ')') // 解析对象
|
|
const data = eval('(' + e.data + ')') // 解析对象
|
|
if (data.type === 'RebateOrderMsg') {
|
|
if (data.type === 'RebateOrderMsg') {
|
|
if (data.res.hasMessage) {
|
|
if (data.res.hasMessage) {
|
|
this.$notify.info({
|
|
this.$notify.info({
|
|
title: '消息',
|
|
title: '消息',
|
|
|
|
+ // eslint-disable-next-line no-undef
|
|
message: res.data.messages,
|
|
message: res.data.messages,
|
|
position: 'bottom-right',
|
|
position: 'bottom-right',
|
|
duration: 4000,
|
|
duration: 4000,
|
|
@@ -752,7 +508,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- websocketOnclose: function (e) {
|
|
|
|
|
|
+ websocketOnclose: function(e) {
|
|
console.debug('connection closed (' + e + ')')
|
|
console.debug('connection closed (' + e + ')')
|
|
if (e) {
|
|
if (e) {
|
|
console.debug('connection closed (' + e.code + ')')
|
|
console.debug('connection closed (' + e.code + ')')
|
|
@@ -772,7 +528,7 @@ export default {
|
|
if (that.lockReconnect) return
|
|
if (that.lockReconnect) return
|
|
that.lockReconnect = true
|
|
that.lockReconnect = true
|
|
// 没连接上会一直重连,设置延迟避免请求过多
|
|
// 没连接上会一直重连,设置延迟避免请求过多
|
|
- setTimeout(function () {
|
|
|
|
|
|
+ setTimeout(function() {
|
|
console.debug('尝试重连...')
|
|
console.debug('尝试重连...')
|
|
that.initWebSocket()
|
|
that.initWebSocket()
|
|
that.lockReconnect = false
|
|
that.lockReconnect = false
|