Browse Source

三方确认

master
han\hanst 1 month ago
parent
commit
a94dc4953e
  1. 7
      src/api/erf/erf.js
  2. 52
      src/views/modules/erf/components/expTriConfirm.vue
  3. 22
      src/views/modules/erf/expApplyList.vue
  4. 1017
      src/views/modules/erf/triConfirm.vue

7
src/api/erf/erf.js

@ -60,10 +60,15 @@ export const getPendingApplyList = data => createAPI(`/erf/expApply/getPendingAp
// =====================================================
/**
* 查询三方确认列表
* 查询三方确认列表按申请单号
*/
export const getTriConfirmList = data => createAPI(`/erf/triConfirm/getTriConfirmList`, 'post', data)
/**
* 查询登录人待确认的工序列表
*/
export const getPendingTriConfirmList = data => createAPI(`/erf/triConfirm/getPendingTriConfirmList`, 'post', data)
/**
* 三方确认操作
*/

52
src/views/modules/erf/components/expTriConfirm.vue

@ -44,13 +44,12 @@
align="center"
header-align="center">
<template slot-scope="scope">
<span v-if="scope.row.prodApproverName" style="color: #67C23A;">
{{ scope.row.prodApproverName }}
<span v-if="scope.row.prodConfirmed" style="color: #67C23A;">
{{ scope.row.prodApproverName }}
</span>
<span v-else-if="canConfirmProcess(scope.row)" style="color: #E6A23C;">
待确认
<span v-else >
{{ scope.row.prodApproverName }}
</span>
<span v-else style="color: #909399;">-</span>
</template>
</el-table-column>
@ -61,13 +60,12 @@
align="center"
header-align="center">
<template slot-scope="scope">
<span v-if="scope.row.qaApproverName" style="color: #67C23A;">
{{ scope.row.qaApproverName }}
<span v-if="scope.row.qaConfirmed" style="color: #67C23A;">
{{ scope.row.qaApproverName }}
</span>
<span v-else-if="canConfirmProcess(scope.row)" style="color: #E6A23C;">
待确认
<span v-else >
{{ scope.row.qaApproverName }}
</span>
<span v-else style="color: #909399;">-</span>
</template>
</el-table-column>
@ -78,13 +76,12 @@
align="center"
header-align="center">
<template slot-scope="scope">
<span v-if="scope.row.techApproverName" style="color: #67C23A;">
{{ scope.row.techApproverName }}
<span v-if="scope.row.techConfirmed" style="color: #67C23A;">
{{ scope.row.techApproverName }}
</span>
<span v-else-if="canConfirmProcess(scope.row)" style="color: #E6A23C;">
待确认
<span v-else>
{{ scope.row.techApproverName }}
</span>
<span v-else style="color: #909399;">-</span>
</template>
</el-table-column>
@ -95,7 +92,7 @@
align="center"
header-align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.confirmStatus === 'CONFIRMED'" type="success" size="small">
<el-tag v-if="scope.row.confirmStatus === '已确认'" type="success" size="small">
已完成
</el-tag>
<el-tag v-else-if="canConfirmProcess(scope.row)" type="warning" size="small">
@ -321,7 +318,14 @@
<el-table-column
prop="userName"
label="姓名"
label="用户账号"
align="center"
header-align="center">
</el-table-column>
<el-table-column
prop="userDisplay"
label="用户名"
align="center"
header-align="center">
</el-table-column>
@ -484,8 +488,14 @@ export default {
watch: {
applyNo: {
immediate: true,
handler(val) {
if (val) {
handler(val, oldVal) {
// applyNo
if (val && val !== oldVal) {
console.log('📋 applyNo 变化,重新加载工序列表:', oldVal, '->', val)
this.loadProcessList()
} else if (val && !oldVal) {
//
console.log('📋 首次加载工序列表:', val)
this.loadProcessList()
}
}
@ -581,7 +591,7 @@ export default {
* 规则第一道工序直接可确认其他工序需要上一道完成
*/
canConfirmProcess(row) {
if (row.confirmStatus === 'CONFIRMED') {
if (row.confirmStatus === '已确认') {
return false //
}
@ -593,7 +603,7 @@ export default {
const previousProcess = this.processList.find(p => p.processSeq === row.processSeq - 1)
//
return previousProcess && previousProcess.confirmStatus === 'CONFIRMED'
return previousProcess && previousProcess.confirmStatus === '已确认'
},
/**

22
src/views/modules/erf/expApplyList.vue

@ -963,9 +963,18 @@ export default {
this.$refs.dataTable.setCurrentRow(row)
})
// tab
// tab
if (this.activeName === 'approvalStatus') {
//
this.loadFlowStatus()
} else if (this.activeName === 'triConfirm') {
//
this.$nextTick(() => {
if (this.$refs.triConfirm && this.$refs.triConfirm.loadProcessList) {
console.log('🔄 行切换,刷新三方确认数据')
this.$refs.triConfirm.loadProcessList()
}
})
} else {
// tab
this.activeName = 'attachment'
@ -983,6 +992,16 @@ export default {
if (tab.name === 'approvalStatus' && this.currentRow.applyNo) {
this.loadFlowStatus()
}
// tab
if (tab.name === 'triConfirm' && this.currentRow.applyNo) {
this.$nextTick(() => {
if (this.$refs.triConfirm && this.$refs.triConfirm.loadProcessList) {
console.log('🔄 Tab切换,刷新三方确认数据')
this.$refs.triConfirm.loadProcessList()
}
})
}
},
/**
@ -1080,6 +1099,7 @@ export default {
const types = {
'下达': 'primary',
'批准': 'success',
'确认': 'success',
'驳回': 'danger',
'撤回': 'warning',
'提醒': 'info',

1017
src/views/modules/erf/triConfirm.vue
File diff suppressed because it is too large
View File

Loading…
Cancel
Save