Jelajahi Sumber

【DFMEA关联DVP】

cuiyingze 7 bulan lalu
induk
melakukan
5b503f9119

+ 1 - 0
src/locales/lang/en-US/baseInfo.js

@@ -28,6 +28,7 @@ export default {
     'base.info.CPAC-code': 'CPAC Code',
     'base.info.system-name': 'System Name',
     'base.info.required-resources (vehicle rack)':'Required Resources (Vehicle Test Bench)',
+    'base.info.please-required-resources (vehicle rack)':'Please Enter Required Resources (Vehicle Test Bench)',
     'base.info.please-enter-system-name':'Please Enter System Name',
     'base.info.change-content': 'Change Content',
     'base.info.please-enter-change-content': 'Please Enter Change Content',

+ 2 - 1
src/locales/lang/en-US/dvpPlan.js

@@ -18,6 +18,7 @@ export default {
   'plan.dvp.sample-vehicle-plan-delivery-time': 'Sample Vehicle Plan Delivery Time',
   'plan.dvp.scheduled-start-time': 'Scheduled Start Time',
   'plan.dvp.scheduled-end-time': 'Scheduled End Time',
+  'plan.dvp.required-resources (vehicle rack)':'Required Resources (Vehicle Test Bench)',
   'plan.dvp.vehicle-performance-module': 'Vehicle Performance Module',
   'plan.dvp.serial-number': 'Serial Number',
   'plan.dvp.expand': 'Expand',
@@ -88,7 +89,7 @@ export default {
   'plan.dvp.material-number': 'Bill Of Materials Number',
   'plan.dvp.template-add': 'Template Adding',
   'plan.dvp.project-fmea-add': 'Project FMEA Adding',
-  'plan.dvp.history-dvp-add': 'Historical DVP adding',
+  'plan.dvp.history-dvp-add': 'Historical Project Adding',
   'plan.dvp.non-equivalent-experiment': 'Non Equivalent Experiment',
   'plan.dvp.equivalent-experiment': 'Equivalent Experiment',
   'plan.dvp.push-to-component-DVP-template': 'Push To Component DVP Template',

+ 1 - 0
src/locales/lang/zh-CN/baseInfo.js

@@ -24,6 +24,7 @@ export default {
     'base.info.required.resources':'需求资源',
     'base.info.please-enter-required.resources':'请输入需求资源',
     'base.info.required-resources (vehicle rack)':'需求资源(整车 台架)',
+    'base.info.please-required-resources (vehicle rack)':'请输入需求资源(整车 台架)',
     'base.info.please-choose-owner': '请选择需求负责人',
     'base.info.development.scope': '开发范围',
     'base.info.serial-number': '序号',

+ 2 - 1
src/locales/lang/zh-CN/dvpPlan.js

@@ -18,6 +18,7 @@ export default {
   'plan.dvp.sample-vehicle-plan-delivery-time': '样车计划提供时间',
   'plan.dvp.scheduled-start-time': '计划开始时间',
   'plan.dvp.scheduled-end-time': '计划结束时间',
+  'plan.dvp.required-resources (vehicle rack)':'需求资源(整车 台架)',
   'plan.dvp.vehicle-performance-module': '整车性能模块',
   'plan.dvp.serial-number': '序号',
   'plan.dvp.expand': '展开',
@@ -105,7 +106,7 @@ export default {
   'plan.dvp.material-number': '材料清单编号',
   'plan.dvp.template-add': '模板添加',
   'plan.dvp.project-fmea-add': '项目FMEA添加',
-  'plan.dvp.history-dvp-add': '历史DVP添加',
+  'plan.dvp.history-dvp-add': '历史项目添加',
   'plan.dvp.non-equivalent-experiment': '非等效实验',
   'plan.dvp.equivalent-experiment': '等效实验',
   'plan.dvp.push-to-component-DVP-template': '推送至零部件DVP模板',

+ 126 - 103
src/views/componentsDVP/dvpPlan/edit.vue

@@ -113,9 +113,17 @@
         </a-form>
         <a-form-item class='tr' >
           <!-- 新建零部件DVP -->
-          <a-button :disabled="isLook || applyButtonFlag" @click='editComponentDvp' type="primary">
+          <a-button :disabled="isLook || applyButtonFlag" @click='addComponentDvp' type="primary" class="ml10">
             {{ $t('global-btn.new') }}
           </a-button>
+          <!-- 模板添加 -->
+          <a-button :disabled="isLook || applyButtonFlag" @click='addTemplateDvP' type="primary" class="ml10">
+            {{ $t('plan.dvp.template-add') }}
+          </a-button>
+          <!-- 历史项目添加 -->
+          <a-button :disabled="isLook || applyButtonFlag" @click='addHistoryDvp' type="primary" class="ml10">
+            {{ $t('plan.dvp.history-dvp-add') }}
+          </a-button>
         </a-form-item>
         <a-table
           ref="tableRef"
@@ -139,6 +147,10 @@
           <template slot='isEquivalent' slot-scope='text, record'>
             <span>{{ isOrNotMap[record.isEquivalent] || '-' }}</span>
           </template>
+          <!-- 是否开展试验 -->
+          <template slot="isCarryOut" slot-scope="text, record">
+            <span :title="text"> {{ isCarryOutMap[record.isCarryOut] || '-' }} </span>
+          </template>
           <!-- 等效实验报告编号 -->
           <template slot='equivalentTestCode' slot-scope='text, record'>
             <span class="clickContent" @click="viewReport(record)" :title="text">{{ record.fileName }}</span>
@@ -147,6 +159,14 @@
           <template slot='dataSource' slot-scope='text, record'>
             <span>{{ dataSourceMap[record.dataSource] || '-' }}</span>
           </template>
+          <!-- 试验类型 -->
+          <template slot="testType" slot-scope="text, record">
+            <span :title="text"> {{ testTypeMap[record.testType] || '-' }} </span>
+          </template>
+          <!-- 试验来源 -->
+          <template slot="testSource" slot-scope="text, record">
+            <span :title="text"> {{ testSourceMap[record.testSource] || '-' }} </span>
+          </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
             <span>
@@ -163,7 +183,7 @@
                 </a-tooltip>
               </a>
               <!-- 删除 -->
-             <a class='operation-btn' @click="deleteDvpData(record)" :disabled="isLook || applyButtonFlag">
+             <a class='operation-btn' @click="deleteDvpData(record)" :disabled="isLook || applyButtonFlag || record.dataSource === '2'">
                 <a-tooltip :title="$t('global-btn.delete')">
                   <i class="iconfont iconshanchu"></i>
                 </a-tooltip>
@@ -174,34 +194,40 @@
       </a-card>
     </a-row>
 
-    <!--零部件编辑DVP弹框-->
+    <!--新建零部件DVP弹框-->
     <a-modal
-      :title="editDvpTittle"
-      :visible="isEdit"
+      :title="$t('plan.dvp.create-dvp')"
+      :visible="isEditDVP"
       :maskClosable="false"
       @ok="saveEditDvp"
       @cancel="cancelEditDvp"
       :width="1000"
     >
-      <a-tabs :activeKey='tabKey' @change="callback">
-        <!-- 新增DVP -->
-        <a-tab-pane :key="'1'" :tab="$t('plan.dvp.create-dvp')">
-          <edit-dvp ref="editDvp" @cancelEditDvp="cancelEditDvp" @initData="initData"/>
-        </a-tab-pane>
-        <!-- 模板添加 -->
-        <a-tab-pane :key="'2'" :tab="$t('plan.dvp.template-add')">
-          <template-edit ref="templateEdit" @cancelEditDvp="cancelEditDvp" @initData="initData"/>
-        </a-tab-pane>
-        <!-- 项目FMEA编辑 -->
-        <a-tab-pane :key="'4'" :tab="$t('plan.dvp.project-fmea-add')">
-          <project-fmea-edit ref="projectFmeaEdit" @cancelEditDvp="cancelEditDvp" @initData="initData"/>
-        </a-tab-pane>
-        <!-- 历史DVP编辑 -->
-        <a-tab-pane :key="'3'" :tab="$t('plan.dvp.history-dvp-add')">
-          <history-dvp-edit ref="historyDvpEdit" @cancelEditDvp="cancelEditDvp" @initData="initData"/>
-        </a-tab-pane>
-      </a-tabs>
+      <edit-dvp ref="editDvp" @cancelEditDvp="cancelEditDvp" @initData="initData"/>
     </a-modal>
+    <!-- 模板添加弹框 -->
+    <a-modal
+      :title="$t('plan.dvp.template-add')"
+      :visible="isEditTemplate"
+      :maskClosable="false"
+      @ok="saveEditDvp"
+      @cancel="cancelEditDvp"
+      :width="1000"
+    >
+      <template-edit ref="templateEdit" @cancelEditDvp="cancelEditDvp" @initData="initData"/>
+    </a-modal>
+     <!-- 历史项目添加弹框 -->
+    <a-modal
+      :title="$t('plan.dvp.history-dvp-add')"
+      :visible="isEditHistory"
+      :maskClosable="false"
+      @ok="saveEditDvp"
+      @cancel="cancelEditDvp"
+      :width="1000"
+    >
+      <history-dvp-edit ref="historyDvpEdit" @cancelEditDvp="cancelEditDvp" @initData="initData"/>
+    </a-modal>
+
     <!-- 编辑表格行数据弹框 -->
     <edit-table-row ref="editTableRow" @closeEditRowModal="closeEditRowModal" @initData="initData" :isEditRow="isEditRow"></edit-table-row>
 
@@ -324,10 +350,9 @@ export default {
           width: 150,
           dataIndex: 'testType',
           align: 'center',
-          ellipsis: true,
-          customRender: val => {
-            return val !== null ? this.testTypeList.find( item => item.value === val ).label : '-';
-          }
+          scopedSlots: {
+            customRender: "testType"
+          },
         },
         // 试验来源
         {
@@ -335,10 +360,9 @@ export default {
           width: 150,
           dataIndex: 'testSource',
           align: 'center',
-          ellipsis: true,
-          customRender: val => {
-            return val !== null ? this.testSourceList.find( item => item.value === val ).label : '-';
-          }
+          scopedSlots: {
+            customRender: "testSource"
+          },
         },
         // 数据来源
         {
@@ -373,6 +397,24 @@ export default {
           align: 'center',
           ellipsis: true
         },
+        // 是否开展试验
+        {
+          title: this.$t('base.info.whether-to-develop-experimental-projects'),
+          width: 150,
+          dataIndex: 'isCarryOut',
+          align: 'center',
+          scopedSlots: {
+            customRender: "isCarryOut"
+          }
+        },
+        // 不开展试验原因
+        {
+          title: this.$t('base.info.reason-for-not-conducting-the-experiment'),
+          width: 150,
+          dataIndex: 'notCarryOutCause',
+          align: 'center',
+          ellipsis: true
+        },
         // 是否等效试验
         {
           title: this.$t('plan.dvp.is-it-an-equivalent-test'),
@@ -531,12 +573,12 @@ export default {
       },
       /** 权限 */
       isLook: false,
-      /** 编辑零部件DVP弹框 tab 默认tab的key */
-      tabKey: '1',
-      /** 编辑零部件DVP弹框 是否显示、关闭 */
-      isEdit: false,
-      /** 编辑零部件DVP弹框标题 */
-      editDvpTittle: this.$t('plan.dvp.create-dvp'),
+      /** 新建零部件DVP弹框 是否显示、关闭 */
+      isEditDVP: false,
+      /** 模板添加弹框 是否显示、关闭 */
+      isEditTemplate: false,
+      /** 历史项目添加弹框 是否显示、关闭 */
+      isEditHistory: false,
       /** 测试负责人下拉选项 */
       testOwnerList: [],
       /** CPAC List */
@@ -581,7 +623,12 @@ export default {
       applyButtonFlag: false,
       /** dvpType system:系统DVP,components:零部件DVP */
       dvpType: "components",
-      cpacId: this.$store.getters.cpacId
+      cpacId: this.$store.getters.cpacId,
+      /** 是否开展试验 */
+      isCarryOutMap: {
+        '0' : this.$t('global-btn.no'),
+        '1' : this.$t('global-btn.yes')
+      }
    }
   },
   watch: {
@@ -911,57 +958,60 @@ export default {
     /**
      * 表格上方按钮-新建零部件DVP
      */
-    editComponentDvp() {
-      this.isEdit = true;
+     addComponentDvp() {
+      this.isEditDVP = true;
+    },
+    /**
+     * 表格上方按钮-模板添加
+     */
+     addTemplateDvP() {
+      this.isEditTemplate = true;
+    },
+    /**
+     * 表格上方按钮-历史项目添加
+     */
+     addHistoryDvp() {
+      this.isEditHistory = true;
     },
 
     /**
      * 编辑零部件DVP-确认按钮
-     * todo 有BUG,只能保存当前显示Tab页的内容
-     * 例如,用户填写完“编辑零部件DVP”Tab页后,未点保存,点击其他Tab页,再次填写,点击保存。“编辑零部件DVP”页填写的信息,就未被保存
      */
     saveEditDvp() {
-      switch (this.tabKey) {
-        case '1':
-          this.$refs.editDvp.saveDvpEdit();
-          break;
-        case '2':
-          this.$refs.templateEdit.saveTemplateEdit();
-          break;
-        case '3':
-          this.$refs.historyDvpEdit.saveHistoryDvpEdit();
-          break;
-        case '4':
-          this.$refs.projectFmeaEdit.saveProjectFmea();
-          break;
-        default:
-          this.editDvpTittle = this.$t('plan.dvp.edit-dvp');
-          break;
+      if (this.isEditDVP) {
+        // 新建零部件DVP
+        this.$refs.editDvp.saveDvpEdit();
+      } else if (this.isEditTemplate) {
+        // 模板添加
+        this.$refs.templateEdit.saveTemplateEdit();
+      } else if (this.isEditHistory) {
+        // 历史项目添加
+        this.$refs.historyDvpEdit.saveHistoryDvpEdit();
       }
     },
 
     /**
-     * 编辑零部件DVP-取消按钮
+     * 表格上方按钮弹框-取消按钮
      */
     cancelEditDvp() {
       let _that = this;
-      _that.$refs.editDvp.editParam.isEquivalent = 0;
-      _that.$refs.editDvp.editParam = { isEquivalent: 0 };
-      _that.$refs.editDvp.checked = false;
-      if (_that.$refs.projectFmeaEdit) {
-        _that.$refs.projectFmeaEdit.formData = {};
-        _that.$refs.projectFmeaEdit.selectedRowKeys = [];
-      }
-      if (_that.$refs.historyDvpEdit) {
-        _that.$refs.historyDvpEdit.formData = {};
-        _that.$refs.historyDvpEdit.selectedRowKeys = [];
-      }
-      if (_that.$refs.templateEdit) {
+      if (_that.isEditDVP) {
+        // 新建零部件DVP 弹窗取消
+        _that.$refs.editDvp.editParam.isEquivalent = 0;
+        _that.$refs.editDvp.editParam = { isEquivalent: 0 };
+        _that.$refs.editDvp.checked = false;
+        _that.isEditDVP = false;
+      } else if (_that.isEditTemplate) {
+        // 模板添加 弹窗取消
         _that.$refs.templateEdit.formData = {};
         _that.$refs.templateEdit.selectedRowKeys = [];
+        _that.isEditTemplate = false;
+      } else if (_that.isEditHistory) {
+        // 历史项目添加 弹窗取消
+        _that.$refs.historyDvpEdit.formData = {};
+        _that.$refs.historyDvpEdit.selectedRowKeys = [];
+        _that.isEditHistory = false;
       }
-      _that.isEdit = false;
-      _that.tabKey = '1';
     },
 
     /**
@@ -988,6 +1038,9 @@ export default {
       this.$refs.editTableRow.editParam.planStartTime = val.planStartTime;
       this.$refs.editTableRow.editParam.planEndTime = val.planEndTime;
       this.$refs.editTableRow.editParam.isEquivalent = val.isEquivalent;
+      this.$refs.editTableRow.editParam.isCarryOut = val.isCarryOut;
+      this.$refs.editTableRow.editParam.notCarryOutCause = val.notCarryOutCause;
+      this.$refs.editTableRow.isCarryOutFlag = val.isCarryOut === 0;
       this.$refs.editTableRow.dataSource = val.dataSource; // 数据来源 0-新建1-模板2-FMEA3-历史DVP
       this.$refs.editTableRow.initData();
       this.isEditRow = true;
@@ -1213,36 +1266,6 @@ export default {
       this.initData();
     },
 
-    /**
-     * 新建零部件DVP弹框 tab回调函数
-     * @param key
-     */
-    callback(key) {
-      this.tabKey = key;
-      switch (this.tabKey) {
-        case '1':
-          this.editDvpTittle = this.$t('plan.dvp.create-dvp');
-          // 不能直接调用子组件初始化方法,是因为tab容器还未加载完,就执行了子组件的初始化方法 浏览器控制台报错
-          // 所以加上$nextTick,如下case同理
-          this.$nextTick(() => { this.$refs.editDvp.initSelectData(); });
-          break;
-        case '2':
-          this.editDvpTittle = this.$t('plan.dvp.template-add');
-          this.$nextTick(() => { this.$refs.templateEdit.initData(); });
-          break;
-        case '3':
-          this.editDvpTittle = this.$t('plan.dvp.history-dvp-add');
-          this.$nextTick(() => { this.$refs.historyDvpEdit.initData(); });
-          break;
-        case '4':
-          this.editDvpTittle = this.$t('plan.dvp.project-fmea-add');
-          break;
-        default:
-          this.editDvpTittle = this.$t('plan.dvp.create-dvp');
-          break;
-      }
-    },
-
     /**
      * 下拉选模糊查询
      * @param input

+ 293 - 119
src/views/componentsDVP/dvpPlan/editModal/editTableRow.vue

@@ -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;
       }
     },
 

+ 3 - 2
src/views/systemDVP/dvpPlan/applyChange/applyForChange.vue

@@ -48,7 +48,7 @@
             <!-- 计划开始时间 -->
             <a-date-picker v-else-if="index === 8" :disabled-date="disabledStartDate" @change='handleStartTime' v-model="record.changeDesc" :disabled="!causeShowFlag" :placeholder="$t('plan.dvp.please_select-scheduled-start-time')" style="width: 100%" valueFormat="YYYY/MM/DD"/>
             <!-- 计划结束时间 -->
-            <a-date-picker v-else-if="index === 9" :disabled-date="disabledEndDate" @change='handleEndTime' v-model="record.changeDesc" :disabled="!causeShowFlag" :placeholder="$t('plan.dvp.please_select-scheduled-end-time')" style="width: 100%" valueFormat="YYYY/MM/DD"/>
+            <a-date-picker v-else-if="index === 9"  :disabled-date="disabledEndDate" @change='handleEndTime' v-model="record.changeDesc" :disabled="!causeShowFlag || testSource === 1" :placeholder="$t('plan.dvp.please_select-scheduled-end-time')" style="width: 100%" valueFormat="YYYY/MM/DD"/>
             <!-- 不开展试验原因 -->
             <a-textarea v-if="index === 10" autoSize v-model.trim="record.changeDesc" :disabled="causeShowFlag" :maxLength="500" :placeholder="$t('base.info.please-enter-change-reason')"></a-textarea>
           </template>
@@ -305,7 +305,8 @@ export default {
       // 表格总宽度
       tableWidth: 0,
       //表格各列宽度总和
-      columnsWidth: 0
+      columnsWidth: 0,
+      testSource: undefined
     };
   },
   watch: {

+ 51 - 16
src/views/systemDVP/dvpPlan/index.vue

@@ -219,15 +219,6 @@
               />
             </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.required-resources (vehicle rack)')">
-              <a-input
-                v-model="editParam.assets"
-                :disabled="true"
-              />
-            </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.verification-content')">
@@ -255,6 +246,18 @@
               />
             </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.required-resources (vehicle rack)')">
+              <!-- 当试验来源是模板(testSource = 0)时不可编辑,是FMEA(testSource = 1)时可以编辑 -->
+              <a-input
+                allowClear
+                v-model="editParam.assets"
+                :disabled="this.editParam.testSource === 0"
+                :placeholder="$t('base.info.please-required-resources (vehicle rack)')"
+              />
+            </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')">
@@ -327,7 +330,13 @@
           <!--计划结束时间-->
           <a-col :lg='16'  :md='24' :sm='24' :xl='12'  :xs='24'>
             <a-form-item required :label="$t('plan.dvp.scheduled-end-time')">
-              <a-date-picker v-model="editParam.planEndTime" :disabled-date="disabledEndDate" @change="handleEditEndTime" style="width: 100%" valueFormat="YYYY/MM/DD" allowClear />
+              <a-date-picker v-model="editParam.planEndTime"
+              :disabled="this.editParam.testSource === 1"
+              :disabled-date="disabledEndDate"
+              @change="handleEditEndTime"
+              style="width: 100%"
+              valueFormat="YYYY/MM/DD"
+              allowClear />
             </a-form-item>
           </a-col>
         </a-form>
@@ -442,7 +451,8 @@ export default {
         count: undefined,                    // 样本数量
         sampleType: undefined,               // 样本类型
         planStartTime: undefined,            // 计划开始时间
-        planEndTime: undefined               // 计划结束时间
+        planEndTime: undefined,              // 计划结束时间
+        assets: undefined                    // 需求资源
       },
       /** 折叠 展开 */
       advanceExpand: false,
@@ -1003,6 +1013,10 @@ export default {
         if (!_that.editParam.planEndTime) {
           message.push(_that.$t('global-constant.please-select') + _that.$t('plan.dvp.scheduled-end-time'));
         }
+        // 需求资源
+        if (!_that.editParam.assets) {
+          message.push(_that.$t('global-constant.please-enter') + _that.$t('plan.dvp.required-resources (vehicle rack)'))
+        }
       } else {
         // 不适用原因
         if (!_that.editParam.notCarryOutCause || _that.editParam.notCarryOutCause.trim().length === 0) {
@@ -1060,7 +1074,8 @@ export default {
        count: this.editParam.count,
        sampleType: this.editParam.sampleType,
        planStartTime: this.editParam.planStartTime,
-       planEndTime: this.editParam.planEndTime
+       planEndTime: this.editParam.planEndTime,
+       assets: this.editParam.assets
      };
       this.$api.editTest(data).then(res => {
         if (!res.flag) {
@@ -1150,6 +1165,7 @@ export default {
       this.editParam.testStage = undefined;
       this.editParam.testSite = undefined;
       this.editParam.testCertification = undefined;
+      this.editParam.assets = undefined;
     },
     /**
      * 导出
@@ -1207,7 +1223,13 @@ export default {
      * @returns {boolean}
      */
     disabledStartDate(current) {
-      return current && current < moment().subtract(1,"day").endOf('day');
+      // return current && current < moment().subtract(1,"day").endOf('day');
+      // 有结束时间,则返回不能选择日期为结束时间之后的日期
+      if (this.editParam.planEndTime) {
+        return current && current > moment(this.editParam.planEndTime).endOf('day');
+      } else { // 无开始时间,则返回不能选择日期为当前时间之前的日期
+        return current && current < moment().subtract(1,"day").endOf('day');
+      }
     },
 
     /**
@@ -1234,9 +1256,21 @@ export default {
       }
       this.editParam.planStartTime = dateString;
       // 当选择的开始时间大于结束时间时,清空结束时间,让用户重新选择结束时间
-      if (Date.parse(this.editParam.planStartTime) > Date.parse(this.editParam.planEndTime)) {
-        this.editParam.planEndTime = undefined;
-      }
+      // if (Date.parse(this.editParam.planStartTime) > Date.parse(this.editParam.planEndTime)) {
+      //   this.editParam.planEndTime = undefined;
+      //   this.$confirm({
+      //     title: this.$t('fmea.warn'),
+      //     content: this.$t('fmea.task.management.whether-to-delete-the-dvp-task'),
+      //     icon: 'exclamation-circle',
+      //     okText: _that.$t('report.confirm'),
+      //     cancelText: _that.$t('workbench.cancel'),
+      //     onOk() {
+      //       _that.delTasks(taskIds);
+      //     },
+      //     onCancel() {
+      //     }
+      //   });
+      // }
     },
     /**
      * 计划结束时间 时间选择器Change方法 编辑
@@ -1377,6 +1411,7 @@ export default {
       this.$refs.applyChange.initTableData(this.applyTableData);
       this.$refs.applyChange.testId = record.testId;
       this.$refs.applyChange.dvpType = this.dvpType;
+      this.$refs.applyChange.testSource = record.testSource;
       // 是否显示不开展试验原因
       if (record.isCarryOut === 1 || record.isCarryOut === undefined || record.isCarryOut === null) {
         this.$refs.applyChange.causeShowFlag = true;