فهرست منبع

优化请样提交按钮显示逻辑并新增取样审批参数配置

yusheng 6 ماه پیش
والد
کامیت
323611ca2c
1فایلهای تغییر یافته به همراه15 افزوده شده و 3 حذف شده
  1. 15 3
      src/views/sample/sampleRecord/components/addSample.vue

+ 15 - 3
src/views/sample/sampleRecord/components/addSample.vue

@@ -305,7 +305,7 @@
         type="primary"
         @click="save('submit')"
         v-loading="loading"
-        v-if="type != 'view'"
+        v-if="type != 'view'&&isSamplingApproval==1"
         >提交</el-button
       >
 
@@ -359,6 +359,8 @@
   import bpmDetail from '@/views/bpm/processInstance/detail.vue';
   import inspectionWorkDialog from '@/views/inspectionWork/components/inspectionWorkDialog.vue';
   import { getCodeList, getCode } from '@/api/login';
+  import { parameterGetByCode } from '@/api/main/index';
+
   export default {
     components: { bpmDetail, inspectionWorkDialog, processSubmitDialog },
     props: {
@@ -612,7 +614,8 @@
         schemeList: [],
         tableList: [],
         type: 'add',
-        title: ''
+        title: '',
+        isSamplingApproval: 0
       };
     },
 
@@ -626,6 +629,7 @@
         this.activeComp = 'main';
         this.visible = true;
         this.type = type;
+        this.parameterGetByCode();
         this.title =
           type == 'add' ? '请样' : type == 'edit' ? '修改请样' : '详情';
         if (type == 'add') {
@@ -636,6 +640,13 @@
           this.getById(row.id);
         }
       },
+      parameterGetByCode() {
+        parameterGetByCode({
+          code: 'sampling_approval'
+        }).then((res) => {
+          this.isSamplingApproval = res.value;
+        });
+      },
       async init(row) {
         let data = await samplingRecordsPage({
           qualityWorkOrderId: row.id
@@ -1268,7 +1279,8 @@
             variables: {
               businessCode: res.code,
               businessName: '请样',
-              businessType: res.qualityWorkOrderVO.conditionType == 1 ? '整样' : '小样'
+              businessType:
+                res.qualityWorkOrderVO.conditionType == 1 ? '整样' : '小样'
             }
           };
           this.$refs.processSubmitDialogRef.init(params);