|
@@ -12,127 +12,255 @@
|
|
|
<!--零部件编号-->
|
|
|
<a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
<a-form-item :label="$t('workbench.compoment-number')">
|
|
|
- <a-input v-model.trim="editParam.partNo" :disabled="true" allowClear :placeholder="$t('global-btn.please-select') + $t('workbench.compoment-number')"></a-input>
|
|
|
+ <a-input
|
|
|
+ v-model.trim="editParam.partNo"
|
|
|
+ :disabled="true"
|
|
|
+ :placeholder="$t('global-btn.please-select') + $t('workbench.compoment-number')"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<!--零部件名称-->
|
|
|
<a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
<a-form-item :label="$t('workbench.compoment-name')">
|
|
|
- <a-input v-model.trim="editParam.partName" :disabled="true" allowClear :placeholder="$t('global-btn.please-select') + $t('workbench.compoment-name')"></a-input>
|
|
|
+ <a-input
|
|
|
+ v-model.trim="editParam.partName"
|
|
|
+ :disabled="true"
|
|
|
+ :placeholder="$t('global-btn.please-select') + $t('workbench.compoment-name')"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<!--CPAC编号-->
|
|
|
<a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
<a-form-item :label="$t('base.info.CPAC-code')">
|
|
|
- <a-input v-model.trim="editParam.cpacCode" :disabled="true" :placeholder="$t('global-btn.please-enter') + $t('base.info.CPAC-code')"/>
|
|
|
+ <a-input
|
|
|
+ v-model.trim="editParam.cpacCode"
|
|
|
+ :disabled="true"
|
|
|
+ :placeholder="$t('global-btn.please-enter') + $t('base.info.CPAC-code')"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<!--FND代码-->
|
|
|
<a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
<a-form-item :label="$t('plan.dvp.fnd-code')">
|
|
|
- <a-input v-model.trim="editParam.fndCode" :disabled="true" :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.fnd-code')" allowClear/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <!--试验类型-->
|
|
|
- <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
- <a-form-item :label="$t('plan.dvp.test-type')" required>
|
|
|
- <a-select v-model="editParam.testType" :disabled="dataSource && dataSource !== '0'" :options="testTypeList" :filter-option="handleFilterDataList" allowClear :placeholder="$t('plan.dvp.please_select-test-type')"></a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <!--试验来源-->
|
|
|
- <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
- <a-form-item :label="$t('plan.dvp.test-source')" required>
|
|
|
- <a-select v-model="editParam.testSource" :disabled="dataSource && dataSource !== '0'" :options="testSourceList" :filter-option="handleFilterDataList" allowClear :placeholder="$t('global-btn.please-select') + $t('plan.dvp.test-source')"></a-select>
|
|
|
+ <a-input
|
|
|
+ v-model.trim="editParam.fndCode"
|
|
|
+ :disabled="true"
|
|
|
+ :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.fnd-code')"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<!--试验项目-->
|
|
|
<a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
<a-form-item :label="$t('plan.dvp.test-project')" required>
|
|
|
- <a-input v-model.trim="editParam.testProject" :disabled="dataSource && dataSource !== '0'" :maxLength='100' allowClear :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.test-project')"/>
|
|
|
+ <a-input
|
|
|
+ v-model.trim="editParam.testProject"
|
|
|
+ :disabled="dataSource && dataSource !== '0'"
|
|
|
+ :maxLength='100' allowClear
|
|
|
+ :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.test-project')"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<!--开发目标要求-->
|
|
|
<a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
<a-form-item :label="$t('base.info.development-objective-requirements')" required>
|
|
|
- <a-input v-model.trim="editParam.targetRequire" :disabled="dataSource && dataSource !== '0'" :maxLength='100' allowClear :placeholder="$t('global-btn.please-enter') + $t('base.info.development-objective-requirements')"/>
|
|
|
+ <a-input
|
|
|
+ v-model.trim="editParam.targetRequire"
|
|
|
+ :disabled="dataSource && dataSource !== '0'"
|
|
|
+ :maxLength='100'
|
|
|
+ allowClear
|
|
|
+ :placeholder="$t('global-btn.please-enter') + $t('base.info.development-objective-requirements')"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<!--试验标准-->
|
|
|
<a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24" >
|
|
|
<a-form-item :label="$t('base.info.Test-standards')" required>
|
|
|
- <a-input v-model.trim="editParam.testStandard" :disabled="dataSource && dataSource !== '0'" :maxLength='500' allowClear :placeholder="$t('global-btn.please-enter') + $t('base.info.Test-standards')"/>
|
|
|
+ <a-input
|
|
|
+ v-model.trim="editParam.testStandard"
|
|
|
+ :disabled="dataSource && dataSource !== '0'"
|
|
|
+ :maxLength='500'
|
|
|
+ allowClear
|
|
|
+ :placeholder="$t('global-btn.please-enter') + $t('base.info.Test-standards')"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <!--等效/非等效-->
|
|
|
+ <!--计划结束时间-->
|
|
|
+ <a-col v-show="editParam.isEquivalent === 0" :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
+ <a-form-item :label="$t('plan.dvp.scheduled-end-time')" required>
|
|
|
+ <a-date-picker
|
|
|
+ v-model="editParam.planEndTime"
|
|
|
+ :disabled-date="disabledEndDate"
|
|
|
+ @change="handleEditEndTime"
|
|
|
+ :disabled="dataSource && dataSource !== '0'"
|
|
|
+ allowClear
|
|
|
+ valueFormat="YYYY/MM/DD"
|
|
|
+ style="width: 100%"
|
|
|
+ :placeholder="$t('global-btn.please-select') + $t('plan.dvp.scheduled-end-time')"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <!--试验类型-->
|
|
|
<a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
- <a-form-item :label="$t('plan.dvp.is-it-an-equivalent-test')">
|
|
|
- <a-radio-group v-model="editParam.isEquivalent" @change="handleEquivalent">
|
|
|
- <a-radio :value="0">
|
|
|
- {{$t('plan.dvp.non-equivalent-experiment') }}
|
|
|
- </a-radio>
|
|
|
- <a-radio :value="1">
|
|
|
- {{ $t('plan.dvp.equivalent-experiment') }}
|
|
|
- </a-radio>
|
|
|
- </a-radio-group>
|
|
|
+ <a-form-item :label="$t('plan.dvp.test-type')" required>
|
|
|
+ <a-select
|
|
|
+ v-model="editParam.testType"
|
|
|
+ :disabled="dataSource && (dataSource === '1' || dataSource === '3')"
|
|
|
+ :options="testTypeList"
|
|
|
+ :filter-option="handleFilterDataList"
|
|
|
+ allowClear
|
|
|
+ :placeholder="$t('plan.dvp.please_select-test-type')">
|
|
|
+ </a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <span v-if="editParam.isEquivalent === 0">
|
|
|
- <!--测试地点-->
|
|
|
- <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
- <a-form-item :label="$t('plan.dvp.test-site')" required>
|
|
|
- <a-input v-model.trim="editParam.testSite" :maxLength='50' allowClear :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.test-site')"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <!--测试负责人-->
|
|
|
- <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
- <a-form-item :label="$t('plan.dvp.test-user')" required>
|
|
|
- <a-select v-model="editParam.testOwner" :options="testOwnerList" :filter-option="handleFilterDataList" allowClear :placeholder="$t('global-btn.please-select') + $t('plan.dvp.test-user')"></a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <!--测试阶段-->
|
|
|
- <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
- <a-form-item :label="$t('plan.dvp.test-step')" required>
|
|
|
- <a-input v-model.trim="editParam.testStep" :maxLength='50' allowClear :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.test-step')"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <!--测试次数-->
|
|
|
- <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
- <a-form-item :label="$t('plan.dvp.test-count')" required>
|
|
|
- <a-input-number v-model.number="editParam.testFrequency" :defaultValue="0" :min="1" :max="999" :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.test-count')" style="width: 100%"></a-input-number>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <!--样本数量-->
|
|
|
- <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
- <a-form-item :label="$t('plan.dvp.number-of-samples')" required>
|
|
|
- <a-input-number v-model.number="editParam.sampleNumber" :defaultValue="0" :min="1" :max="999" :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.number-of-samples')" style="width: 100%"></a-input-number>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <!--样件类型-->
|
|
|
- <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
- <a-form-item :label="$t('plan.dvp.sample-type')" required>
|
|
|
- <a-input v-model.trim="editParam.sampleType" :maxLength='50' allowClear :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.sample-type')"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <!--计划开始时间-->
|
|
|
- <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
- <a-form-item :label="$t('plan.dvp.scheduled-start-time')" required>
|
|
|
- <a-date-picker v-model="editParam.planStartTime" :disabled-date="disabledStartDate" @change="handleEditStartTime" allowClear valueFormat="YYYY/MM/DD" style="width: 100%" :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.scheduled-start-time')"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <!--计划结束时间-->
|
|
|
- <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
- <a-form-item :label="$t('plan.dvp.scheduled-end-time')" required>
|
|
|
- <a-date-picker v-model="editParam.planEndTime" :disabled-date="disabledEndDate" @change="handleEditEndTime" allowClear valueFormat="YYYY/MM/DD" style="width: 100%" :placeholder="$t('global-btn.please-select') + $t('plan.dvp.scheduled-end-time')"/>
|
|
|
+ <!--试验来源-->
|
|
|
+ <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
+ <a-form-item :label="$t('plan.dvp.test-source')" required>
|
|
|
+ <a-select
|
|
|
+ v-model="editParam.testSource"
|
|
|
+ :disabled="dataSource && (dataSource === '1' || dataSource === '3')"
|
|
|
+ :options="testSourceList"
|
|
|
+ :filter-option="handleFilterDataList"
|
|
|
+ allowClear
|
|
|
+ :placeholder="$t('global-btn.please-select') + $t('plan.dvp.test-source')">
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <!-- 是否开展实验项目 -->
|
|
|
+ <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
+ <a-form-item required :label="$t('base.info.whether-to-develop-experimental-projects')">
|
|
|
+ <a-select
|
|
|
+ v-model="editParam.isCarryOut"
|
|
|
+ allowClear
|
|
|
+ @change="handleCarryOut"
|
|
|
+ :placeholder="$t('base.info.please-enter-whether-to-develop-experimental-projects')">
|
|
|
+ <a-select-option :value="1">{{ $t('global-btn.yes') }}</a-select-option>
|
|
|
+ <a-select-option :value="0">{{ $t('global-btn.no') }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <!-- 选择不开展试验,显示不开展试验原因富文本框 -->
|
|
|
+ <span v-show="isCarryOutFlag">
|
|
|
+ <!--不开展试验原因-->
|
|
|
+ <a-col :xl='24' :lg='24' :md='24' :sm='24' :xs='24'>
|
|
|
+ <a-form-item required :label="$t('base.info.reason-for-not-conducting-the-experiment')">
|
|
|
+ <a-textarea
|
|
|
+ rows='6'
|
|
|
+ v-model.trim="editParam.notCarryOutCause"
|
|
|
+ style="width: 100%;"
|
|
|
+ :placeholder="$t('base.info.please-enter-reason-for-not-conducting-the-experiment')"
|
|
|
+ :maxLength='50'>
|
|
|
+ </a-textarea>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</span>
|
|
|
- <span v-else>
|
|
|
- <!--等效实验报告编号-->
|
|
|
+ <!-- 选择开展试验,显示等效/非等效试验等表单项 -->
|
|
|
+ <span v-show="!isCarryOutFlag">
|
|
|
+ <!--等效/非等效-->
|
|
|
<a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
- <a-form-item :label="$t('plan.dvp.equivalent-experiment-report-number')" required>
|
|
|
- <a-select v-model="editParam.equivalentId" :options="equivalentList" :filter-option="handleFilterDataList" allowClear :placeholder="$t('global-btn.please-select') + $t('plan.dvp.equivalent-experiment-report-number')"></a-select>
|
|
|
+ <a-form-item :label="$t('plan.dvp.is-it-an-equivalent-test')">
|
|
|
+ <a-radio-group
|
|
|
+ v-model="editParam.isEquivalent"
|
|
|
+ @change="handleEquivalent">
|
|
|
+ <a-radio :value="0">
|
|
|
+ {{$t('plan.dvp.non-equivalent-experiment') }}
|
|
|
+ </a-radio>
|
|
|
+ <a-radio :value="1">
|
|
|
+ {{ $t('plan.dvp.equivalent-experiment') }}
|
|
|
+ </a-radio>
|
|
|
+ </a-radio-group>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <!-- 选择了非等效试验,显示对应的表单项 -->
|
|
|
+ <span v-show="editParam.isEquivalent === 0">
|
|
|
+ <!--计划开始时间-->
|
|
|
+ <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
+ <a-form-item :label="$t('plan.dvp.scheduled-start-time')" required>
|
|
|
+ <a-date-picker
|
|
|
+ v-model="editParam.planStartTime"
|
|
|
+ :disabled-date="disabledStartDate"
|
|
|
+ @change="handleEditStartTime"
|
|
|
+ allowClear
|
|
|
+ valueFormat="YYYY/MM/DD"
|
|
|
+ style="width: 100%"
|
|
|
+ :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.scheduled-start-time')"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <!--测试地点-->
|
|
|
+ <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
+ <a-form-item :label="$t('plan.dvp.test-site')" required>
|
|
|
+ <a-input
|
|
|
+ v-model.trim="editParam.testSite"
|
|
|
+ :maxLength='50'
|
|
|
+ allowClear
|
|
|
+ :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.test-site')"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <!--测试负责人-->
|
|
|
+ <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
+ <a-form-item :label="$t('plan.dvp.test-user')" required>
|
|
|
+ <a-select
|
|
|
+ v-model="editParam.testOwner"
|
|
|
+ :options="testOwnerList"
|
|
|
+ :filter-option="handleFilterDataList"
|
|
|
+ allowClear
|
|
|
+ :placeholder="$t('global-btn.please-select') + $t('plan.dvp.test-user')">
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <!--测试阶段-->
|
|
|
+ <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
+ <a-form-item :label="$t('plan.dvp.test-step')" required>
|
|
|
+ <a-input
|
|
|
+ v-model.trim="editParam.testStep"
|
|
|
+ :maxLength='50'
|
|
|
+ allowClear
|
|
|
+ :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.test-step')"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <!--测试次数-->
|
|
|
+ <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
+ <a-form-item :label="$t('plan.dvp.test-count')" required>
|
|
|
+ <a-input-number
|
|
|
+ v-model.number="editParam.testFrequency"
|
|
|
+ :defaultValue="0"
|
|
|
+ :min="1"
|
|
|
+ :max="999"
|
|
|
+ :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.test-count')"
|
|
|
+ style="width: 100%">
|
|
|
+ </a-input-number>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <!--样本数量-->
|
|
|
+ <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
+ <a-form-item :label="$t('plan.dvp.number-of-samples')" required>
|
|
|
+ <a-input-number
|
|
|
+ v-model.number="editParam.sampleNumber"
|
|
|
+ :defaultValue="0"
|
|
|
+ :min="1"
|
|
|
+ :max="999"
|
|
|
+ :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.number-of-samples')"
|
|
|
+ style="width: 100%">
|
|
|
+ </a-input-number>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <!--样件类型-->
|
|
|
+ <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
+ <a-form-item :label="$t('plan.dvp.sample-type')" required>
|
|
|
+ <a-input
|
|
|
+ v-model.trim="editParam.sampleType"
|
|
|
+ :maxLength='50'
|
|
|
+ allowClear
|
|
|
+ :placeholder="$t('global-btn.please-enter') + $t('plan.dvp.sample-type')"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </span>
|
|
|
+ <!-- 选择了等效试验,只用显示等效试验报告编号下拉选表单 -->
|
|
|
+ <span v-show="editParam.isEquivalent === 1">
|
|
|
+ <!--等效实验报告编号-->
|
|
|
+ <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
|
|
|
+ <a-form-item :label="$t('plan.dvp.equivalent-experiment-report-number')" required>
|
|
|
+ <a-select
|
|
|
+ v-model="editParam.equivalentId"
|
|
|
+ :options="equivalentList"
|
|
|
+ :filter-option="handleFilterDataList"
|
|
|
+ allowClear
|
|
|
+ :placeholder="$t('global-btn.please-select') + $t('plan.dvp.equivalent-experiment-report-number')">
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </span>
|
|
|
</span>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
@@ -174,7 +302,8 @@ export default {
|
|
|
sampleType: undefined,
|
|
|
planStartTime: undefined,
|
|
|
planEndTime: undefined,
|
|
|
- isEquivalent: undefined
|
|
|
+ isEquivalent: undefined,
|
|
|
+ isCarryOut: undefined
|
|
|
},
|
|
|
/** 用于记录初始值 */
|
|
|
planStartTime: undefined,
|
|
@@ -228,7 +357,9 @@ export default {
|
|
|
/** 等效实验报告编号下拉选项 */
|
|
|
fileList: [],
|
|
|
/**数据来源 0-新建1-模板2-FMEA3-历史DVP */
|
|
|
- dataSource: this.$route.query.dataSource
|
|
|
+ dataSource: undefined,
|
|
|
+ /** 是否显示开展原因 */
|
|
|
+ isCarryOutFlag: false
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -297,7 +428,6 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -327,45 +457,61 @@ export default {
|
|
|
if (!_that.editParam.testStandard) {
|
|
|
message.push(_that.$t('global-btn.please-enter') + _that.$t('base.info.Test-standards'));
|
|
|
}
|
|
|
- // 非等效试验时校验以下数据
|
|
|
- if (_that.editParam.isEquivalent === 0) {
|
|
|
- // 测试地点
|
|
|
- if (!_that.editParam.testSite) {
|
|
|
- message.push(_that.$t('global-btn.please-enter') + _that.$t('plan.dvp.test-site'));
|
|
|
- }
|
|
|
- // 测试负责人
|
|
|
- if (!_that.editParam.testOwner) {
|
|
|
- message.push(_that.$t('global-btn.please-select') + _that.$t('plan.dvp.test-user'));
|
|
|
- }
|
|
|
- // 测试阶段
|
|
|
- if (!_that.editParam.testStep) {
|
|
|
- message.push(_that.$t('global-btn.please-enter') + _that.$t('plan.dvp.test-step'));
|
|
|
- }
|
|
|
- // 测试次数
|
|
|
- if (!_that.editParam.testFrequency) {
|
|
|
- message.push(_that.$t('global-btn.please-enter') + _that.$t('plan.dvp.test-count'));
|
|
|
- }
|
|
|
- // 样本数量
|
|
|
- if (!_that.editParam.sampleNumber) {
|
|
|
- message.push(_that.$t('global-btn.please-enter') + _that.$t('plan.dvp.number-of-samples'));
|
|
|
- }
|
|
|
- // 样件类型
|
|
|
- if (!_that.editParam.sampleType) {
|
|
|
- message.push(_that.$t('global-btn.please-enter') + _that.$t('plan.dvp.sample-type'));
|
|
|
- }
|
|
|
- // 计划开始时间
|
|
|
- if (!_that.editParam.planStartTime) {
|
|
|
- message.push(_that.$t('global-btn.please-select') + _that.$t('plan.dvp.scheduled-start-time'));
|
|
|
- }
|
|
|
+ // 不是FMEA推送数据且选择非等效试验,就进行校验计划结束时间,其他情况不校验
|
|
|
+ if (_that.dataSource !== '2' && _that.editParam.isEquivalent === 0) {
|
|
|
// 计划结束时间
|
|
|
if (!_that.editParam.planEndTime) {
|
|
|
message.push(_that.$t('global-btn.please-select') + _that.$t('plan.dvp.scheduled-end-time'));
|
|
|
}
|
|
|
- } else {
|
|
|
- // 等效实现时校验
|
|
|
- // 等效试验报告编号
|
|
|
- if (!_that.editParam.equivalentId) {
|
|
|
- message.push(_that.$t('global-btn.please-select') + _that.$t('plan.dvp.equivalent-experiment-report-number'));
|
|
|
+ }
|
|
|
+ // 是否开展实验
|
|
|
+ if (_that.editParam.isCarryOut === undefined) {
|
|
|
+ message.push(_that.$t('base.info.please-enter-whether-to-develop-experimental-projects'));
|
|
|
+ }
|
|
|
+ // 选择了不开展试验,校验不开展原因
|
|
|
+ if (_that.editParam.isCarryOut === 0) {
|
|
|
+ if (!_that.editParam.notCarryOutCause) {
|
|
|
+ message.push(_that.$('base.info.please-enter-reason-for-not-conducting-the-experiment'));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 选择了开展试验,校验其他表单数据
|
|
|
+ if (_that.editParam.isCarryOut === 1) {
|
|
|
+ // 非等效试验时校验以下数据
|
|
|
+ if (_that.editParam.isEquivalent === 0) {
|
|
|
+ // 测试地点
|
|
|
+ if (!_that.editParam.testSite) {
|
|
|
+ message.push(_that.$t('global-btn.please-enter') + _that.$t('plan.dvp.test-site'));
|
|
|
+ }
|
|
|
+ // 测试负责人
|
|
|
+ if (!_that.editParam.testOwner) {
|
|
|
+ message.push(_that.$t('global-btn.please-select') + _that.$t('plan.dvp.test-user'));
|
|
|
+ }
|
|
|
+ // 测试阶段
|
|
|
+ if (!_that.editParam.testStep) {
|
|
|
+ message.push(_that.$t('global-btn.please-enter') + _that.$t('plan.dvp.test-step'));
|
|
|
+ }
|
|
|
+ // 测试次数
|
|
|
+ if (!_that.editParam.testFrequency) {
|
|
|
+ message.push(_that.$t('global-btn.please-enter') + _that.$t('plan.dvp.test-count'));
|
|
|
+ }
|
|
|
+ // 样本数量
|
|
|
+ if (!_that.editParam.sampleNumber) {
|
|
|
+ message.push(_that.$t('global-btn.please-enter') + _that.$t('plan.dvp.number-of-samples'));
|
|
|
+ }
|
|
|
+ // 样件类型
|
|
|
+ if (!_that.editParam.sampleType) {
|
|
|
+ message.push(_that.$t('global-btn.please-enter') + _that.$t('plan.dvp.sample-type'));
|
|
|
+ }
|
|
|
+ // 计划开始时间
|
|
|
+ if (!_that.editParam.planStartTime) {
|
|
|
+ message.push(_that.$t('global-btn.please-select') + _that.$t('plan.dvp.scheduled-start-time'));
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 等效试验选择了“是”时校验
|
|
|
+ // 等效试验报告编号
|
|
|
+ if (!_that.editParam.equivalentId) {
|
|
|
+ message.push(_that.$t('global-btn.please-select') + _that.$t('plan.dvp.equivalent-experiment-report-number'));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (message && message.length > 0) {
|
|
@@ -377,6 +523,32 @@ export default {
|
|
|
return true;
|
|
|
},
|
|
|
|
|
|
+ /**
|
|
|
+ * 是否开展实验项目 编辑
|
|
|
+ * @param val
|
|
|
+ */
|
|
|
+ handleCarryOut(val) {
|
|
|
+ this.editParam.isCarryOut = val;
|
|
|
+ // 当选择了不开展试验 val=0,开展试验表单标志isCarryOutFlag = true,不开展试验表单显示
|
|
|
+ if (val === 0) {
|
|
|
+ this.isCarryOutFlag = true;
|
|
|
+ // 选择了不开展试验,清空其他表单数据
|
|
|
+ this.editParam.isEquivalent = undefined;
|
|
|
+ this.editParam.equivalentId = undefined;
|
|
|
+ this.editParam.planStartTime = undefined;
|
|
|
+ this.editParam.testSite = undefined;
|
|
|
+ this.editParam.testOwner = undefined;
|
|
|
+ this.editParam.testStep = undefined;
|
|
|
+ this.editParam.testFrequency = undefined;
|
|
|
+ this.editParam.sampleNumber = undefined;
|
|
|
+ this.editParam.sampleType = undefined;
|
|
|
+ } else {
|
|
|
+ this.isCarryOutFlag = false;
|
|
|
+ this.editParam.isEquivalent = 0;
|
|
|
+ this.editParam.notCarryOutCause = undefined;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* 确认按钮
|
|
|
*/
|
|
@@ -403,6 +575,8 @@ export default {
|
|
|
planStartTime: this.editParam.planStartTime,
|
|
|
planEndTime: this.editParam.planEndTime,
|
|
|
isPush: this.editParam.isPushTemplate,
|
|
|
+ isCarryOut: this.editParam.isCarryOut,
|
|
|
+ notCarryOutCause: this.editParam.notCarryOutCause,
|
|
|
dvpAddFileModel: this.fileList[0]
|
|
|
};
|
|
|
this.$api.planTestSave(data).then( res => {
|
|
@@ -453,6 +627,7 @@ export default {
|
|
|
*/
|
|
|
cancel() {
|
|
|
this.fileList = [];
|
|
|
+ this.editParam.isCarryOut = undefined;
|
|
|
this.$emit("closeEditRowModal");
|
|
|
},
|
|
|
|
|
@@ -483,7 +658,6 @@ export default {
|
|
|
this.editParam.sampleNumber = undefined;
|
|
|
this.editParam.sampleType = undefined;
|
|
|
this.editParam.planStartTime = undefined;
|
|
|
- this.editParam.planEndTime = undefined;
|
|
|
}
|
|
|
},
|
|
|
|