diff --git a/resources/frontend/src/api/user.js b/resources/frontend/src/api/user.js index f730ddc..a6acd1b 100644 --- a/resources/frontend/src/api/user.js +++ b/resources/frontend/src/api/user.js @@ -60,3 +60,11 @@ export function messageRead(id, data) { data }) } + +export function messageReadAll(data) { + return http({ + url: `/api/website_message/batchRead`, + method: "post", + data: data + }) +} diff --git a/resources/frontend/src/views/index.vue b/resources/frontend/src/views/index.vue index a1d0e87..67024da 100644 --- a/resources/frontend/src/views/index.vue +++ b/resources/frontend/src/views/index.vue @@ -81,6 +81,9 @@
+
+ 标记全部已读 +
import { removeToken } from "@/util/auth" import { getMenu } from "../api/menu.js" -import { websiteMessage, messageRead } from "../api/user.js" +import { websiteMessage, messageRead, messageReadAll } from "../api/user.js" export default { mounted() { @@ -242,6 +245,17 @@ export default { this.page = 1 this.pageSize = e this.getMsgList() + }, + markHasRead() { + let ids = [] + this.msgList.forEach(it => { + ids.push(it.id) + }) + messageReadAll({ids: ids}).then((res) => { + this.page = 1 + this.getMsgList() + this.getNoReadNum() + }) } } } @@ -429,7 +443,7 @@ export default { .bottom{ display: flex; align-items: center; - justify-content: center; + justify-content: space-between; padding: 20px 0; border-top: 1px solid #D7D7D7; } diff --git a/resources/frontend/src/views/supplyChain/procureCheck.vue b/resources/frontend/src/views/supplyChain/procureCheck.vue index 6a79408..e54756e 100644 --- a/resources/frontend/src/views/supplyChain/procureCheck.vue +++ b/resources/frontend/src/views/supplyChain/procureCheck.vue @@ -23,6 +23,19 @@ @change="handleSearch()">
+
+ 采购时间: + + +
审核状态: @@ -35,8 +48,14 @@
+ - +
+ 批量审核 +
+ + + @@ -79,7 +98,7 @@ - + @@ -109,12 +128,14 @@ export default { pageSize: 15, total: 0, procureList: [], + chooseList: [], filter: { title: '', external_sku_id: '', status: '' }, addTime: [], + buyTime: [], curInfo: {}, commitloading: false, dialogVisible: false, @@ -122,7 +143,8 @@ export default { { id: 0, name: '待审核' }, { id: 1, name: '审核通过' }, { id: 2, name: '审核不通过' } - ] + ], + opaType: '' } }, methods: { @@ -133,7 +155,9 @@ export default { per_page: this.pageSize, ...this.filter, start_time: this.addTime ? this.addTime[0] : '', - end_time: this.addTime ? this.addTime[1] : '' + end_time: this.addTime ? this.addTime[1] : '', + date_start_time: this.buyTime ? this.buyTime[0] : '', + date_end_time: this.buyTime ? this.buyTime[1] : '' } getPurchaseLog(params).then((res) => { this.procureList = res.data.data @@ -158,6 +182,7 @@ export default { }, toExamine(row) { this.curInfo = JSON.parse(JSON.stringify(row)) + this.opaType = 'normal' this.dialogVisible = true }, commitCheck() { @@ -167,13 +192,26 @@ export default { } this.commitloading = true let params = { - purchaseOrders: [{ + purchaseOrders: [] + } + if(this.opaType == 'normal') { + params.purchaseOrders = [{ id: this.curInfo.id, status: this.curInfo.status, num: this.curInfo.num }] + } else { + for (let index = 0; index < this.chooseList.length; index++) { + params.purchaseOrders.push({ + id: this.chooseList[index].id, + status: this.curInfo.status, + num: this.chooseList[index].num + }) + } } examinePurchase(params).then((res) => { + this.chooseList = [] + this.$refs.cesTable.clearSelection() this.$message({ type: "success", message: "操作成功!" }) this.commitloading = false this.dialogVisible = false @@ -181,6 +219,23 @@ export default { }).catch(() => { this.commitloading = false }) + }, + batchExamine() { + this.curInfo = { + status: 0 + } + this.opaType = 'batch' + this.dialogVisible = true + }, + handleSelectionChange(val) { + this.chooseList = val + }, + selectable(row, index) { + if (row.status == 1) { + return false; + } else { + return true; + } } }, mounted() { @@ -226,4 +281,7 @@ export default { cursor: pointer; width: fit-content; } + .opaBox{ + margin-bottom: 15px; + }