diff --git a/src/views/common/home.vue b/src/views/common/home.vue
index 4dbc565..d783513 100644
--- a/src/views/common/home.vue
+++ b/src/views/common/home.vue
@@ -5,7 +5,7 @@
@@ -39,6 +39,16 @@
{{ myPerformanceScoreCount }}
{{ myPerformanceScoreCount > 0 ? '' : 'Null' }}
+
+
+
Inspection Request Audit
+
{{ inspectionAuditCount }}
+
{{ inspectionAuditCount > 0 ? '' : 'Null' }}
+
@@ -49,6 +59,7 @@
import {searchSysLanguagePack} from "../../api/sysLanguage";
import { supplierDocExpireReminder, supplierContractRequestExpireReminder } from '@/api/srm/srmSupplier.js'
import { myPerformanceScoreReminder } from '@/api/supplierPerformance/myPerformanceEvaluateRequest.js'
+import { searchInspectionRequestHeaderList } from '@/api/inspection/inspectionRequestHeader.js'
export default {
data(){
@@ -59,10 +70,12 @@ export default {
contractExpireReminderCount: 0,
contractExpireReminderIds: [],
myPerformanceScoreCount: 0,
+ inspectionAuditCount: 0,
homeTileShow: {
supplierDocExpire: true,
contractRequestExpire: true,
myPerformanceScore: true,
+ inspectionAudit: true,
},
/** 代办卡片悬停外圈脉冲(双环);false 时无任何脉冲描边 */
homeCardPulseEnabled: false,
@@ -78,6 +91,9 @@ export default {
onMyPerformanceScoreClick () {
this.goMyPerformanceScoreList()
},
+ onInspectionAuditClick () {
+ this.goInspectionAuditList()
+ },
loadDocExpireReminder () {
const site = this.$store.state.user.site
supplierDocExpireReminder({ site }).then(({ data }) => {
@@ -141,6 +157,26 @@ export default {
}
})
},
+ loadInspectionAuditReminder () {
+ const site = this.$store.state.user.site
+ // 直接使用审核页面的查询接口,查询未审核的数据
+ const params = {
+ page: 1,
+ limit: 1, // 只需要知道有多少条,不需要加载全部数据
+ status: 'Confirmed', // 只查询已确认(待审核)的状态
+ site: site
+ }
+ searchInspectionRequestHeaderList(params).then(({ data }) => {
+ if (data && data.code === 0 && data.page) {
+ this.inspectionAuditCount = data.page.totalCount || 0
+ }
+ }).catch(() => {})
+ },
+ goInspectionAuditList () {
+ if (!this.inspectionAuditCount) return
+ // 跳转到验货申请审核页面
+ this.$router.push({ name: 'inspection-inspectionRequestAudit' })
+ },
languageRefresh(){
console.log("欢迎使用 旭捷管理系统!!!")
},
@@ -180,6 +216,9 @@ export default {
if (this.homeTileShow.myPerformanceScore) {
this.loadMyPerformanceScoreReminder()
}
+ if (this.homeTileShow.inspectionAudit) {
+ this.loadInspectionAuditReminder()
+ }
},
watch: {
'homeTileShow.supplierDocExpire'(v) {
@@ -196,6 +235,11 @@ export default {
if (v) {
this.loadMyPerformanceScoreReminder()
}
+ },
+ 'homeTileShow.inspectionAudit'(v) {
+ if (v) {
+ this.loadInspectionAuditReminder()
+ }
}
},
diff --git a/src/views/modules/inspection/inspectionRequestList.vue b/src/views/modules/inspection/inspectionRequestList.vue
index 8bbc521..5221c32 100644
--- a/src/views/modules/inspection/inspectionRequestList.vue
+++ b/src/views/modules/inspection/inspectionRequestList.vue
@@ -237,8 +237,37 @@
批量选择PO
+
+
+
+
+ sortable
+ :sort-method="(a, b) => sortCrdDate(a, b)">
{
this.poList = []
+ this.filteredPoList = []
this.$message.error('加载PO列表失败')
})
},
@@ -929,6 +965,68 @@ export default {
this.selectedPoList = selection
},
+ // 筛选PO列表
+ filterPoList () {
+ let result = [...this.poList]
+
+ if (this.poSearchKeyword) {
+ const keyword = this.poSearchKeyword.toLowerCase()
+ result = result.filter(item =>
+ item.orderRef1 && item.orderRef1.toLowerCase().includes(keyword)
+ )
+ }
+
+ if (this.crdSortOrder) {
+ result.sort((a, b) => {
+ const dateA = a.crd || ''
+ const dateB = b.crd || ''
+
+ if (!dateA && !dateB) return 0
+ if (!dateA) return this.crdSortOrder === 'asc' ? -1 : 1
+ if (!dateB) return this.crdSortOrder === 'asc' ? 1 : -1
+
+ if (this.crdSortOrder === 'asc') {
+ return dateA.localeCompare(dateB)
+ } else {
+ return dateB.localeCompare(dateA)
+ }
+ })
+ }
+
+ this.filteredPoList = result
+ },
+
+ // 切换CRD日期排序
+ toggleCrdSort () {
+ if (!this.crdSortOrder) {
+ this.crdSortOrder = 'asc'
+ } else if (this.crdSortOrder === 'asc') {
+ this.crdSortOrder = 'desc'
+ } else {
+ this.crdSortOrder = ''
+ }
+ this.filterPoList()
+ },
+
+ // 重置筛选
+ resetPoFilter () {
+ this.poSearchKeyword = ''
+ this.crdSortOrder = ''
+ this.filteredPoList = [...this.poList]
+ },
+
+ // CRD日期排序方法
+ sortCrdDate (a, b) {
+ const dateA = a.crd || ''
+ const dateB = b.crd || ''
+
+ if (!dateA && !dateB) return 0
+ if (!dateA) return -1
+ if (!dateB) return 1
+
+ return dateA.localeCompare(dateB)
+ },
+
// 验货数量变化
handleInspectQtyChange (row, value) {
console.log('验货数量变化:', row.orderRef1, value)
diff --git a/src/views/modules/inspection/myTodoList.vue b/src/views/modules/inspection/myTodoList.vue
index 1ca2366..07add48 100644
--- a/src/views/modules/inspection/myTodoList.vue
+++ b/src/views/modules/inspection/myTodoList.vue
@@ -2,7 +2,7 @@