|
|
|
@ -411,6 +411,30 @@ |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
<!-- Tab: 备注 --> |
|
|
|
<el-tab-pane label="备注" name="remark"> |
|
|
|
<div v-if="currentRow.applyNo" style="padding: 16px;"> |
|
|
|
<el-input |
|
|
|
type="textarea" |
|
|
|
v-model="remarkText" |
|
|
|
:rows="10" |
|
|
|
placeholder="请输入备注内容" |
|
|
|
style="width: 100%" |
|
|
|
></el-input> |
|
|
|
<div style="margin-top: 12px; text-align: left;"> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
size="small" |
|
|
|
:loading="remarkSaving" |
|
|
|
@click="saveRemarkHandle">保存备注</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else class="empty-tip"> |
|
|
|
<i class="el-icon-edit-outline" style="font-size: 40px; color: #C0C4CC; margin-bottom: 10px"></i> |
|
|
|
<p style="font-size: 13px">请选择申请单填写备注</p> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
</el-tabs> |
|
|
|
|
|
|
|
<!-- 新增/编辑弹窗 --> |
|
|
|
@ -587,7 +611,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { searchExpApplyList, submitExpApply, deleteExpApply, withdrawExpApply, cancelExpApply, copyExpApply, getSubmitApprovers, getFlowStatus, getTriConfirmList, confirmSample } from '@/api/erf/erf' |
|
|
|
import { searchExpApplyList, submitExpApply, deleteExpApply, withdrawExpApply, cancelExpApply, copyExpApply, getSubmitApprovers, getFlowStatus, getTriConfirmList, confirmSample, saveRemark } from '@/api/erf/erf' |
|
|
|
import { getBuList } from '@/api/factory/site' |
|
|
|
import ExpApplyForm from './components/expApplyForm.vue' |
|
|
|
import ExpProjectDetail from './components/expProjectDetail.vue' |
|
|
|
@ -640,6 +664,10 @@ export default { |
|
|
|
// 当前选中行 |
|
|
|
currentRow: {}, |
|
|
|
|
|
|
|
// 备注 |
|
|
|
remarkText: '', |
|
|
|
remarkSaving: false, |
|
|
|
|
|
|
|
// Tab页签 |
|
|
|
activeName: 'attachment', |
|
|
|
|
|
|
|
@ -1118,31 +1146,50 @@ export default { |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 保存备注 |
|
|
|
*/ |
|
|
|
saveRemarkHandle() { |
|
|
|
if (!this.currentRow.applyNo) { |
|
|
|
this.$message.warning('请先选择申请单') |
|
|
|
return |
|
|
|
} |
|
|
|
this.remarkSaving = true |
|
|
|
saveRemark({ applyNo: this.currentRow.applyNo, remark: this.remarkText }).then(({data}) => { |
|
|
|
this.remarkSaving = false |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success('备注保存成功') |
|
|
|
this.getDataList('Y') |
|
|
|
//this.currentRow.remark = this.remarkText |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '保存失败') |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.remarkSaving = false |
|
|
|
this.$message.error('保存异常') |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 行点击事件 |
|
|
|
*/ |
|
|
|
handleRowClick(row) { |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
this.remarkText = row.remark || '' |
|
|
|
// 设置表格当前行高亮 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.dataTable.setCurrentRow(row) |
|
|
|
}) |
|
|
|
|
|
|
|
// 根据当前tab刷新对应的数据 |
|
|
|
// 根据当前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' |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|