Bläddra i källkod

零部件DVP计划基本信息显示
删除推送零部件模板
删除按钮调试

wumingxin 5 månader sedan
förälder
incheckning
f6d2cf4ecc

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

@@ -70,4 +70,5 @@ export default {
 
     'fmea.warn': 'Warn',
     'global-message.warn.delete-frequency': 'This frequency data will be deleted and cannot be recovered. Are you sure to delete it?',
+    'global-message.warn.delete-componentsDVP-test': 'This data will be deleted and cannot be recovered. Are you sure to delete it?',
 }

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

@@ -70,4 +70,5 @@ export default {
 
 	'fmea.warn': '警告',
     'global-message.warn.delete-frequency': '该条频次数据将被删除且不可恢复,确定删除吗?',
+    'global-message.warn.delete-componentsDVP-test': '该条数据将被删除且不可恢复,确定删除吗?',
 }

+ 4 - 0
src/providers/http.js

@@ -768,6 +768,10 @@ export const api = {
   planTestEmpty: function (paramObj) {
     return post('/DFMEA/partDvp/planTestEmpty', paramObj);
   },
+  // 零部件DVP-DVP计划列表 清空
+  planTestDel: function (paramObj) {
+    return post('/DFMEA/partDvp/planTestDel', paramObj);
+  },
   // 零部件DVP 模板批量编辑页面初始化
   initTemplateList: function (paramObj) {
     return fetch('/DFMEA/partDvp/initTemplateList', paramObj);

+ 62 - 49
src/views/componentsDVP/dvpPlan/edit.vue

@@ -6,31 +6,32 @@
           <a-row :gutter="24">
             <!--零部件名称-->
             <a-col :xl="6" :lg="8" :md="12" :sm="24" :xs="24">
-              <a-form-item :label="$t('workbench.compoment-name')">
-                <span  class="ml8">{{ formData.partName }}</span>
+              <a-form-item style="white-space: nowrap" :label="$t('workbench.compoment-name') + '::'">
+                {{ baseInfo.partName ? baseInfo.partName : "--" }}
               </a-form-item>
             </a-col>
             <!--零部件编号-->
             <a-col :xl='6' :lg='8' :md='24' :sm='24' :xs='24'>
-              <a-form-item :label="$t('workbench.compoment-number')">
-                <span  class="ml8">{{ formData.partCode }}</span>
+              <a-form-item style="white-space: nowrap" :label="$t('workbench.compoment-number') + '::'">
+                <span  class="ml8">{{ baseInfo.partNo ? baseInfo.partNo : "--" }}</span>
               </a-form-item>
             </a-col>
             <!-- cpac编号 -->
             <a-col :xl='6' :lg='8' :md='24' :sm='24' :xs='24'>
-              <a-form-item :label="$t('verity.dvp.cpac.number')">
-                <span  class="ml8">{{ formData.cpacCode }}</span>
+              <a-form-item style="white-space: nowrap" :label="$t('verity.dvp.cpac.number') + '::'">
+                <span  class="ml8">{{ baseInfo.cpacCode ? baseInfo.cpacCode : "--" }}</span>
               </a-form-item>
             </a-col>
             <!--FND代码-->
             <a-col :xl='6' :lg='8' :md='24' :sm='24' :xs='24'>
-              <a-form-item :label="$t('verity.dvp.fnd.code')">
-                <span  class="ml8">{{ formData.fndCode }}</span>
+              <a-form-item style="white-space: nowrap" :label="$t('verity.dvp.fnd.code') + '::'">
+                <span  class="ml8">{{ baseInfo.fndCode ? baseInfo.fndCode : "--" }}</span>
               </a-form-item>
             </a-col>
           </a-row>
         </a-form>
-
+      </a-card>
+      <a-card class="layout-card" :style="{ height: tableHeight }">
         <a-form layout='vertical'>
           <a-row :gutter="24">
             <!--归属部门-->
@@ -120,15 +121,13 @@
                   {{ $t('global-btn.reset') }}
                 </a-button>
                 <!-- 查询 -->
-                <a-button @click='search' type="primary" class="mr10">
+                <a-button @click='search' type="primary" class="mr12">
                   {{ $t('global-btn.search') }}
                 </a-button>
               </a-col>
             </a-form-item>
           </a-row>
         </a-form>
-      </a-card>
-      <a-card class="layout-card" :style="{ height: tableHeight }">
         <a-form-item class='tr' >
           <!-- 新建零部件DVP -->
           <a-button :disabled="isLook || applyButtonFlag" @click='editComponentDvp' type="primary">
@@ -183,9 +182,9 @@
                   <i class="iconfont  iconprocess_branch"></i>
                 </a-tooltip>
               </a>
-              <!-- 清空 -->
-             <a class='operation-btn' @click="clearDvpData(record)" :disabled="isLook || applyButtonFlag">
-                <a-tooltip :title="$t('plan.dvp.clear')">
+              <!-- 删除 -->
+             <a class='operation-btn' @click="deleteDvpData(record)" :disabled="isLook || applyButtonFlag">
+                <a-tooltip :title="$t('global-btn.delete')">
                   <i class="iconfont iconshanchu"></i>
                 </a-tooltip>
               </a>
@@ -301,6 +300,8 @@ export default {
     return{
       /** 查询数据 */
       formData:{},
+      /** 基本信息数据源 */
+      baseInfo: {},
       /** 清除时间选框用的 */
       endTime: undefined,
       startTime: undefined,
@@ -795,6 +796,7 @@ export default {
       _that.formData.systemTestSource = _that.formData.dataSource;
       _that.$api.initDvpTestList(_that.formData).then(res => {
         if (res.flag) {
+          _that.baseInfo = res.data.data[0];
           _that.tableData = res.data.data || [];
           _that.tableData.forEach( item => {
             if (item.equivalentTestCode) {
@@ -1102,20 +1104,31 @@ export default {
     },
 
     /**
-     * 表格操作列-清空
+     * 表格操作列-删除
      */
-    clearDvpData(val) {
-      let data = {
-        dvpId: this.$store.getters.dvpId,
-        testId: val.testId
-      };
-      this.$api.planTestEmpty(data).then(res => {
-        if (res.flag) {
-          this.$message.success(res.message);
-          this.initData();
-        } else {
-          this.$message.error(res.message);
-        }
+    deleteDvpData(record) {
+      let _that = this;
+      _that.$confirm({
+        title: _that.$t('fmea.warn'),
+        content: _that.$t('global-message.warn.delete-componentsDVP-test'),
+        icon: 'exclamation-circle',
+        okText: _that.$t('global-btn.confirm'),
+        cancelText: _that.$t('global-btn.cancel'),
+        onOk() {
+          let data = {
+            dvpId: _that.$route.query.dvpId,
+            testId: record.testId,
+          };
+          _that.$api.planTestDel(data).then(res => {
+            if (res.flag) {
+              _that.$message.success(res.message);
+              _that.initData();
+            } else {
+              _that.$message.error(res.message);
+            }
+          });
+        },
+        onCancel() {}
       });
     },
 
@@ -1274,27 +1287,27 @@ export default {
       this.applyFlag = true;
     },
 
-    /**
-     * 表格上方按钮-导出
-     */
-    exportFile() {
-      this.download('/DFMEA/partDvp/dvpPlanExcelExport', {
-        dvpId: this.$store.getters.dvpId || '',
-        partCode: this.formData.partCode || '',
-        partName: this.formData.partName || '',
-        fndId: this.formData.fndCode || '',
-        ownerDepartmentId: this.formData.ownerDepartmentId || '',
-        testOwner: this.formData.testOwner || '',
-        testType: this.formData.testType || '',
-        testSource: this.formData.testSource || '',
-        systemTestSource: this.formData.systemTestSource || '',
-        targetRequire: this.formData.targetRequire || '',
-        testStandard: this.formData.testStandard || '',
-        testSite: this.formData.testSite || '',
-        planStartTime: this.formData.planStartTime || '',
-        planEndTime: this.formData.planEndTime || '',
-      });
-    },
+    // /**
+    //  * 表格上方按钮-导出
+    //  */
+    // exportFile() {
+    //   this.download('/DFMEA/partDvp/dvpPlanExcelExport', {
+    //     dvpId: this.$store.getters.dvpId || '',
+    //     partCode: this.formData.partCode || '',
+    //     partName: this.formData.partName || '',
+    //     fndId: this.formData.fndCode || '',
+    //     ownerDepartmentId: this.formData.ownerDepartmentId || '',
+    //     testOwner: this.formData.testOwner || '',
+    //     testType: this.formData.testType || '',
+    //     testSource: this.formData.testSource || '',
+    //     systemTestSource: this.formData.systemTestSource || '',
+    //     targetRequire: this.formData.targetRequire || '',
+    //     testStandard: this.formData.testStandard || '',
+    //     testSite: this.formData.testSite || '',
+    //     planStartTime: this.formData.planStartTime || '',
+    //     planEndTime: this.formData.planEndTime || '',
+    //   });
+    // },
 
     /**
      * 搜索框-开始时间

+ 0 - 20
src/views/componentsDVP/dvpPlan/editModal/editTableRow.vue

@@ -133,14 +133,6 @@
             </a-form-item>
           </a-col>
         </span>
-        <!--是否推送至零部件模板-->
-        <a-col :lg="16" :md="24" :sm="24" :xl="12" :xs="24">
-          <a-form-item :label="$t('plan.dvp.whether-to-push-to-component-template')">
-            <a-checkbox @change="handlePushTemplate">
-              {{ $t('plan.dvp.push-to-component-DVP-template') }}
-            </a-checkbox>
-          </a-form-item>
-        </a-col>
       </a-row>
     </a-form>
   </a-modal>
@@ -479,18 +471,6 @@ export default {
       this.editParam.isEquivalent = e.target.value;
     },
 
-    /**
-     * 是否推送至零部件模板
-     * @param e
-     */
-    handlePushTemplate(e) {
-      if (e.target.checked) {
-        this.editParam.isPushTemplate = 0;
-      } else {
-        this.editParam.isPushTemplate = 1;
-      }
-    },
-
     /**
      * 开始时间不能选择当天
      * @param current