|
|
@ -41,12 +41,12 @@ |
|
|
<el-form-item label="状态"> |
|
|
<el-form-item label="状态"> |
|
|
<el-select v-model="queryHeaderData.status" placeholder="请选择" clearable style="width: 120px"> |
|
|
<el-select v-model="queryHeaderData.status" placeholder="请选择" clearable style="width: 120px"> |
|
|
<el-option label="全部" value=""></el-option> |
|
|
<el-option label="全部" value=""></el-option> |
|
|
<el-option label="草稿" value="DRAFT"></el-option> |
|
|
|
|
|
<el-option label="已下达" value="SUBMITTED"></el-option> |
|
|
|
|
|
<el-option label="已批准" value="APPROVED"></el-option> |
|
|
|
|
|
<el-option label="生产中" value="IN_PRODUCTION"></el-option> |
|
|
|
|
|
<el-option label="已完成" value="COMPLETED"></el-option> |
|
|
|
|
|
<el-option label="已取消" value="CANCELLED"></el-option> |
|
|
|
|
|
|
|
|
<el-option label="草稿" value="草稿"></el-option> |
|
|
|
|
|
<el-option label="已下达" value="已下达"></el-option> |
|
|
|
|
|
<el-option label="已批准" value="已批准"></el-option> |
|
|
|
|
|
<el-option label="生产中" value="生产中"></el-option> |
|
|
|
|
|
<el-option label="样品确认" value="样品确认"></el-option> |
|
|
|
|
|
<el-option label="已完成" value="已完成"></el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
@ -93,7 +93,7 @@ |
|
|
|
|
|
|
|
|
<el-table-column |
|
|
<el-table-column |
|
|
label="操作" |
|
|
label="操作" |
|
|
width="120" |
|
|
|
|
|
|
|
|
width="150" |
|
|
align="center" |
|
|
align="center" |
|
|
header-align="center"> |
|
|
header-align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
@ -108,6 +108,9 @@ |
|
|
<a |
|
|
<a |
|
|
v-if="scope.row.status !== '草稿' && scope.row.status !== '已完成' && scope.row.status !== '已驳回'" |
|
|
v-if="scope.row.status !== '草稿' && scope.row.status !== '已完成' && scope.row.status !== '已驳回'" |
|
|
@click="withdrawApply(scope.row)">撤回</a> |
|
|
@click="withdrawApply(scope.row)">撤回</a> |
|
|
|
|
|
<a |
|
|
|
|
|
v-if="showSampleConfirmBtn(scope.row)" |
|
|
|
|
|
@click="openSampleConfirm(scope.row)">样品确认</a> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
@ -133,6 +136,13 @@ |
|
|
align="center" |
|
|
align="center" |
|
|
header-align="center"> |
|
|
header-align="center"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
<!-- <el-table-column |
|
|
|
|
|
prop="currentStep" |
|
|
|
|
|
label="当前步骤" |
|
|
|
|
|
width="90" |
|
|
|
|
|
align="center" |
|
|
|
|
|
header-align="center"> |
|
|
|
|
|
</el-table-column>--> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="experimentType" |
|
|
prop="experimentType" |
|
|
label="试验类型" |
|
|
label="试验类型" |
|
|
@ -176,6 +186,20 @@ |
|
|
header-align="center"> |
|
|
header-align="center"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="actualFinishDate" |
|
|
|
|
|
label="最终完成日期" |
|
|
|
|
|
width="120" |
|
|
|
|
|
align="center" |
|
|
|
|
|
header-align="center"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="finalQuantity" |
|
|
|
|
|
label="入库数量" |
|
|
|
|
|
width="80" |
|
|
|
|
|
align="center" |
|
|
|
|
|
header-align="center"> |
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="creatorName" |
|
|
prop="creatorName" |
|
|
label="创建人" |
|
|
label="创建人" |
|
|
@ -373,6 +397,57 @@ |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 样品确认弹窗 --> |
|
|
|
|
|
<el-dialog |
|
|
|
|
|
title="样品确认" |
|
|
|
|
|
:visible.sync="sampleConfirmVisible" |
|
|
|
|
|
width="500px" |
|
|
|
|
|
:close-on-click-modal="false"> |
|
|
|
|
|
|
|
|
|
|
|
<el-form :model="sampleConfirmData" label-width="120px" size="small"> |
|
|
|
|
|
<el-form-item label="申请单号"> |
|
|
|
|
|
<el-tag type="primary">{{ sampleConfirmData.applyNo }}</el-tag> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="样品数量" required> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="sampleConfirmData.sampleQuantity" |
|
|
|
|
|
:min="0" |
|
|
|
|
|
:precision="0" |
|
|
|
|
|
placeholder="请输入样品数量" |
|
|
|
|
|
style="width: 100%"> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
<div style="margin-top: 5px; color: #909399; font-size: 12px"> |
|
|
|
|
|
不输入或输入0表示样品报废,大于0表示正常入库 |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="最终完成日期" required> |
|
|
|
|
|
<el-date-picker |
|
|
|
|
|
v-model="sampleConfirmData.finalFinishDate" |
|
|
|
|
|
type="date" |
|
|
|
|
|
format="yyyy-MM-dd" |
|
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
|
placeholder="请选择最终完成日期" |
|
|
|
|
|
style="width: 100%"> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="样品状态"> |
|
|
|
|
|
<el-tag :type="getSampleStatusTagType()"> |
|
|
|
|
|
{{ getSampleStatusText() }} |
|
|
|
|
|
</el-tag> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button @click="sampleConfirmVisible = false">取消</el-button> |
|
|
|
|
|
<el-button type="primary" @click="confirmSampleSubmit" :loading="sampleConfirmLoading"> |
|
|
|
|
|
{{ sampleConfirmLoading ? '确认中...' : '确认' }} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- 下达确认弹窗 - 选择审批人 --> |
|
|
<!-- 下达确认弹窗 - 选择审批人 --> |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
title="确认审批人信息" |
|
|
title="确认审批人信息" |
|
|
@ -441,7 +516,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { searchExpApplyList, submitExpApply, deleteExpApply, withdrawExpApply, getSubmitApprovers, getFlowStatus, getTriConfirmList } from '@/api/erf/erf' |
|
|
|
|
|
|
|
|
import { searchExpApplyList, submitExpApply, deleteExpApply, withdrawExpApply, getSubmitApprovers, getFlowStatus, getTriConfirmList, confirmSample } from '@/api/erf/erf' |
|
|
import { getBuList } from '@/api/factory/site' |
|
|
import { getBuList } from '@/api/factory/site' |
|
|
import ExpApplyForm from './components/expApplyForm.vue' |
|
|
import ExpApplyForm from './components/expApplyForm.vue' |
|
|
import ExpProjectDetail from './components/expProjectDetail.vue' |
|
|
import ExpProjectDetail from './components/expProjectDetail.vue' |
|
|
@ -496,7 +571,7 @@ export default { |
|
|
activeName: 'attachment', |
|
|
activeName: 'attachment', |
|
|
|
|
|
|
|
|
// 表格高度 |
|
|
// 表格高度 |
|
|
tableHeight: (window.innerHeight - 260)/2, |
|
|
|
|
|
|
|
|
tableHeight: (window.innerHeight - 300)/2, |
|
|
detailHeight: '35vh', |
|
|
detailHeight: '35vh', |
|
|
|
|
|
|
|
|
// 下达确认弹窗 |
|
|
// 下达确认弹窗 |
|
|
@ -521,6 +596,15 @@ export default { |
|
|
progressPercent: 0, |
|
|
progressPercent: 0, |
|
|
stages: [], |
|
|
stages: [], |
|
|
approvalLogs: [] |
|
|
approvalLogs: [] |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 样品确认弹窗 |
|
|
|
|
|
sampleConfirmVisible: false, |
|
|
|
|
|
sampleConfirmLoading: false, |
|
|
|
|
|
sampleConfirmData: { |
|
|
|
|
|
applyNo: '', |
|
|
|
|
|
sampleQuantity: null, |
|
|
|
|
|
finalFinishDate: '' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -1131,6 +1215,88 @@ export default { |
|
|
const seconds = String(date.getSeconds()).padStart(2, '0') |
|
|
const seconds = String(date.getSeconds()).padStart(2, '0') |
|
|
|
|
|
|
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}` |
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}` |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 判断是否显示样品确认按钮 |
|
|
|
|
|
* Low Risk: 计划员排产完成后(currentStep="已完成"且status="生产中")显示 |
|
|
|
|
|
* High Risk: 三方确认阶段(currentStep="三方确认"且status="生产中")显示 |
|
|
|
|
|
*/ |
|
|
|
|
|
showSampleConfirmBtn(row) { |
|
|
|
|
|
if (row.experimentType === 'Low Risk') { |
|
|
|
|
|
return row.currentStep === '样品确认' |
|
|
|
|
|
} else if (row.experimentType === 'High Risk') { |
|
|
|
|
|
return row.currentStep === '样品确认' |
|
|
|
|
|
} |
|
|
|
|
|
return false |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 打开样品确认对话框 |
|
|
|
|
|
*/ |
|
|
|
|
|
openSampleConfirm(row) { |
|
|
|
|
|
this.sampleConfirmData = { |
|
|
|
|
|
applyNo: row.applyNo, |
|
|
|
|
|
sampleQuantity: null, |
|
|
|
|
|
finalFinishDate: '' |
|
|
|
|
|
} |
|
|
|
|
|
this.sampleConfirmVisible = true |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 获取样品状态标签类型 |
|
|
|
|
|
*/ |
|
|
|
|
|
getSampleStatusTagType() { |
|
|
|
|
|
if (!this.sampleConfirmData.sampleQuantity || this.sampleConfirmData.sampleQuantity === 0) { |
|
|
|
|
|
return 'danger' |
|
|
|
|
|
} |
|
|
|
|
|
return 'success' |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 获取样品状态文本 |
|
|
|
|
|
*/ |
|
|
|
|
|
getSampleStatusText() { |
|
|
|
|
|
if (!this.sampleConfirmData.sampleQuantity || this.sampleConfirmData.sampleQuantity === 0) { |
|
|
|
|
|
return '报废' |
|
|
|
|
|
} |
|
|
|
|
|
return '正常入库' |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 提交样品确认 |
|
|
|
|
|
*/ |
|
|
|
|
|
confirmSampleSubmit() { |
|
|
|
|
|
// 验证最终完成日期必填 |
|
|
|
|
|
if (!this.sampleConfirmData.finalFinishDate) { |
|
|
|
|
|
this.$message.warning('请选择最终完成日期') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
// 确定样品状态 |
|
|
|
|
|
const finalStatus = (!this.sampleConfirmData.sampleQuantity || this.sampleConfirmData.sampleQuantity === 0) |
|
|
|
|
|
? '报废' |
|
|
|
|
|
: '正常入库' |
|
|
|
|
|
|
|
|
|
|
|
const finalQuantity = this.sampleConfirmData.sampleQuantity || 0 |
|
|
|
|
|
this.sampleConfirmLoading = true |
|
|
|
|
|
confirmSample({ |
|
|
|
|
|
applyNo: this.sampleConfirmData.applyNo, |
|
|
|
|
|
finalQuantity: finalQuantity, |
|
|
|
|
|
finalStatus: finalStatus, |
|
|
|
|
|
actualFinishDate: this.sampleConfirmData.finalFinishDate |
|
|
|
|
|
}).then(({data}) => { |
|
|
|
|
|
this.sampleConfirmLoading = false |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message.success('样品确认成功') |
|
|
|
|
|
this.sampleConfirmVisible = false |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(data.msg || '样品确认失败') |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.sampleConfirmLoading = false |
|
|
|
|
|
this.$message.error('样品确认异常') |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|