|
|
@@ -25,16 +25,32 @@
|
|
|
<el-tab-pane label="成本调查表" name="costSurvey">
|
|
|
<cost-survey :id="id" />
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="成本审核" name="costAudit">
|
|
|
+ <el-tab-pane
|
|
|
+ v-if="currentNode !== 'clcs'"
|
|
|
+ label="成本审核"
|
|
|
+ name="costAudit"
|
|
|
+ >
|
|
|
<cost-audit :id="id" />
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="工作底稿" name="workDraft">
|
|
|
+ <el-tab-pane
|
|
|
+ v-if="currentNode !== 'clcs'"
|
|
|
+ label="工作底稿"
|
|
|
+ name="workDraft"
|
|
|
+ >
|
|
|
<work-draft :id="id" />
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="提取材料登记" name="extractMaterial">
|
|
|
+ <el-tab-pane
|
|
|
+ v-if="currentNode !== 'clcs'"
|
|
|
+ label="提取材料登记"
|
|
|
+ name="extractMaterial"
|
|
|
+ >
|
|
|
<extract-material :id="id" />
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="成本审核意见" name="auditOpinion">
|
|
|
+ <el-tab-pane
|
|
|
+ v-if="currentNode !== 'clcs'"
|
|
|
+ label="成本审核意见"
|
|
|
+ name="auditOpinion"
|
|
|
+ >
|
|
|
<audit-opinion
|
|
|
:id="id"
|
|
|
:current-node="currentNode"
|
|
|
@@ -43,8 +59,106 @@
|
|
|
@close="handleClose"
|
|
|
/>
|
|
|
</el-tab-pane>
|
|
|
+ <el-tab-pane label="消息通知" name="messageNotify">
|
|
|
+ <message-notify :id="id" />
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-drawer>
|
|
|
+ <!-- 补充资料弹窗 -->
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="showSupplementDialog"
|
|
|
+ title="补充资料"
|
|
|
+ width="500px"
|
|
|
+ :modal="false"
|
|
|
+ >
|
|
|
+ <div class="dialog-content">
|
|
|
+ <div class="form-item">
|
|
|
+ <el-input
|
|
|
+ v-model="additionalParams.content"
|
|
|
+ type="textarea"
|
|
|
+ :rows="6"
|
|
|
+ placeholder="请输入补充意见"
|
|
|
+ maxlength="500"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="form-item">
|
|
|
+ <label class="form-label">发送方式</label>
|
|
|
+ <el-checkbox-group v-model="additionalParams.sendType">
|
|
|
+ <el-checkbox label="site">站内消息</el-checkbox>
|
|
|
+ <el-checkbox label="sms">短信通知</el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="showSupplementDialog = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="submitSupplement">发送</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 中止监审弹窗 -->
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="showAbortDialog"
|
|
|
+ title="中止监审"
|
|
|
+ width="500px"
|
|
|
+ :modal="false"
|
|
|
+ >
|
|
|
+ <div class="dialog-content">
|
|
|
+ <div class="form-item">
|
|
|
+ <el-input
|
|
|
+ v-model="additionalParams.content"
|
|
|
+ type="textarea"
|
|
|
+ :rows="6"
|
|
|
+ placeholder="请输入中止意见"
|
|
|
+ maxlength="500"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="form-item">
|
|
|
+ <label class="form-label">发送方式</label>
|
|
|
+ <el-checkbox-group v-model="additionalParams.sendType">
|
|
|
+ <el-checkbox label="site">站内消息</el-checkbox>
|
|
|
+ <el-checkbox label="sms">短信通知</el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="showAbortDialog = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="submitAbort">发送</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 初审退回弹窗 -->
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="showRejectDialog"
|
|
|
+ title="初审退回"
|
|
|
+ width="500px"
|
|
|
+ :modal="false"
|
|
|
+ >
|
|
|
+ <div class="dialog-content">
|
|
|
+ <div class="form-item">
|
|
|
+ <el-input
|
|
|
+ v-model="additionalParams.content"
|
|
|
+ type="textarea"
|
|
|
+ :rows="6"
|
|
|
+ placeholder="请输入退回意见"
|
|
|
+ maxlength="500"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="form-item">
|
|
|
+ <label class="form-label">发送方式</label>
|
|
|
+ <el-checkbox-group v-model="additionalParams.sendType">
|
|
|
+ <el-checkbox label="site">站内消息</el-checkbox>
|
|
|
+ <el-checkbox label="sms">短信通知</el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="showRejectDialog = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="submitReject">发送</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -55,6 +169,7 @@
|
|
|
import workDraft from './workDraft.vue'
|
|
|
import extractMaterial from './extractMaterial.vue'
|
|
|
import auditOpinion from './auditOpinion.vue'
|
|
|
+ import messageNotify from './messageNotify.vue'
|
|
|
import {
|
|
|
getDataPreliminaryReviewButton,
|
|
|
doProcessBtn,
|
|
|
@@ -68,6 +183,7 @@
|
|
|
workDraft,
|
|
|
extractMaterial,
|
|
|
auditOpinion,
|
|
|
+ messageNotify,
|
|
|
},
|
|
|
props: {
|
|
|
visible: {
|
|
|
@@ -91,6 +207,14 @@
|
|
|
return {
|
|
|
buttonData: [], //资料初审按钮数据
|
|
|
activeTab: 'submitData', // 默认选中报送资料标签页
|
|
|
+ // 弹窗显示状态
|
|
|
+ showSupplementDialog: false,
|
|
|
+ showAbortDialog: false,
|
|
|
+ showRejectDialog: false,
|
|
|
+ // 弹窗数据
|
|
|
+ additionalParams: {},
|
|
|
+ // 当前操作按钮信息
|
|
|
+ currentButton: null,
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -173,15 +297,11 @@
|
|
|
methods: {
|
|
|
// 根据 currentNode 和 currentStatus 设置活动标签页
|
|
|
setActiveTab() {
|
|
|
- // 如果 currentNode 是 'sdshenhe' 并且 currentStatus 是 '审核中',显示成本审核标签页
|
|
|
- if (
|
|
|
- this.currentNode === 'sdshenhe' &&
|
|
|
- this.currentStatus === '审核中'
|
|
|
- ) {
|
|
|
+ if (this.currentNode === 'sdsh' && this.currentStatus === '审核中') {
|
|
|
this.activeTab = 'costAudit'
|
|
|
} else if (this.currentNode === 'clcs') {
|
|
|
// 如果 currentNode 是 'clcs',显示成本调查表标签页
|
|
|
- this.activeTab = 'costSurvey'
|
|
|
+ this.activeTab = 'submitData'
|
|
|
} else if (
|
|
|
this.currentNode === 'yjgaozhi' ||
|
|
|
this.currentNode === 'yjfk'
|
|
|
@@ -230,37 +350,113 @@
|
|
|
this.$emit('update:visible', true)
|
|
|
},
|
|
|
// 处理审核操作按钮点击
|
|
|
- async handleAuditPass(item) {
|
|
|
+ handleAuditPass(item) {
|
|
|
+ this.additionalParams = {
|
|
|
+ content: '',
|
|
|
+ sendType: [], // 默认选中站内消息和短信通知
|
|
|
+ }
|
|
|
+ this.currentButton = item // 保存当前按钮信息
|
|
|
+ console.log('点击的按钮数据:', item)
|
|
|
+ const key = Number(item.key)
|
|
|
+ if (key === 1) {
|
|
|
+ this.showSupplementDialog = true
|
|
|
+ } else if (key === 2) {
|
|
|
+ // 中止监审
|
|
|
+ this.showAbortDialog = true
|
|
|
+ } else if (key === 4) {
|
|
|
+ // 初审退回
|
|
|
+ this.showRejectDialog = true
|
|
|
+ } else {
|
|
|
+ this.executeAuditOperation()
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 执行审核操作
|
|
|
+ async executeAuditOperation() {
|
|
|
if (!this.id) {
|
|
|
this.$message.error('缺少任务ID')
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ if (!this.currentButton) {
|
|
|
+ this.$message.error('操作失败:缺少按钮信息')
|
|
|
+ return
|
|
|
+ }
|
|
|
try {
|
|
|
const params = {
|
|
|
taskId: this.id,
|
|
|
- ...(this.currentNode &&
|
|
|
- this.currentNode.trim() !== '' && {
|
|
|
- processNodeKey:
|
|
|
- this.currentNode === 'ccls' ? 'clcs' : this.currentNode,
|
|
|
- }),
|
|
|
- // 根据按钮项传递其他必要参数
|
|
|
- ...item,
|
|
|
+ processNodeKey: this.currentNode,
|
|
|
+ key: this.currentButton.key,
|
|
|
+ sendType: this.additionalParams.sendType?.join(','),
|
|
|
+ content: this.additionalParams.content,
|
|
|
}
|
|
|
|
|
|
const response = await doProcessBtn(params)
|
|
|
|
|
|
if (response && response.code === 200) {
|
|
|
- this.$message.success(item.value + '操作成功')
|
|
|
- // 关闭弹窗
|
|
|
+ this.$message.success(this.currentButton.value + '操作成功')
|
|
|
+ // 关闭所有弹窗
|
|
|
+ this.showSupplementDialog = false
|
|
|
+ this.showAbortDialog = false
|
|
|
+ this.showRejectDialog = false
|
|
|
+ // 关闭主弹窗
|
|
|
this.handleClose()
|
|
|
// 触发父组件刷新列表
|
|
|
this.$emit('refresh')
|
|
|
} else {
|
|
|
- this.$message.error(response?.message || item.value + '操作失败')
|
|
|
+ this.$message.error(
|
|
|
+ response?.message || this.currentButton.value + '操作失败'
|
|
|
+ )
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- this.$message.error(item.value + '操作失败')
|
|
|
+ this.$message.error(this.currentButton.value + '操作失败')
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 提交补充资料
|
|
|
+ submitSupplement() {
|
|
|
+ if (
|
|
|
+ !this.additionalParams.content ||
|
|
|
+ !this.additionalParams.content.trim()
|
|
|
+ ) {
|
|
|
+ this.$message.error('请输入补充意见')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.currentButton) {
|
|
|
+ this.executeAuditOperation(this.currentButton)
|
|
|
+ } else {
|
|
|
+ this.$message.error('操作失败:缺少按钮信息')
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 提交中止监审
|
|
|
+ submitAbort() {
|
|
|
+ if (
|
|
|
+ !this.additionalParams.content ||
|
|
|
+ !this.additionalParams.content.trim()
|
|
|
+ ) {
|
|
|
+ this.$message.error('请输入中止意见')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.currentButton) {
|
|
|
+ this.executeAuditOperation(this.currentButton)
|
|
|
+ } else {
|
|
|
+ this.$message.error('操作失败:缺少按钮信息')
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 提交初审退回
|
|
|
+ submitReject() {
|
|
|
+ if (
|
|
|
+ !this.additionalParams.content ||
|
|
|
+ !this.additionalParams.content.trim()
|
|
|
+ ) {
|
|
|
+ this.$message.error('请输入退回意见')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.currentButton) {
|
|
|
+ this.executeAuditOperation(this.currentButton)
|
|
|
+ } else {
|
|
|
+ this.$message.error('操作失败:缺少按钮信息')
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
@@ -305,4 +501,37 @@
|
|
|
.audit-tabs .el-tab-pane {
|
|
|
height: 100%;
|
|
|
}
|
|
|
+
|
|
|
+ /* 弹窗样式 */
|
|
|
+ .dialog-content {
|
|
|
+ padding: 10px 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .form-item {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .form-label {
|
|
|
+ display: inline-block;
|
|
|
+ width: 100px;
|
|
|
+ text-align: right;
|
|
|
+ margin-right: 0;
|
|
|
+ color: #606266;
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+
|
|
|
+ .form-item .el-checkbox-group {
|
|
|
+ display: inline-block;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .form-item .el-checkbox {
|
|
|
+ margin-right: 20px;
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+
|
|
|
+ .form-item .el-input__inner {
|
|
|
+ width: calc(100% - 115px);
|
|
|
+ margin-left: 115px;
|
|
|
+ }
|
|
|
</style>
|