Przeglądaj źródła

修复临时计划不能审批

695593266@qq.com 5 miesięcy temu
rodzic
commit
da088fa57c

+ 12 - 6
src/views/productionPlan/components/factoryAdd/index.vue

@@ -448,7 +448,12 @@
       <el-button type="primary" @click="save" :loading="loading">
         确定
       </el-button>
-      <el-button type="primary" @click="save('sub')" :loading="loading">
+      <el-button
+        type="primary"
+        @click="save('sub')"
+        :loading="loading"
+        v-if="!isReview"
+      >
         发布
       </el-button>
     </template>
@@ -471,6 +476,7 @@
     temporaryPlanSave,
     getUpdateInfoByCode
   } from '@/api/saleOrder';
+  import { planIsReview } from '@/api/productionPlan/index';
   import contactDialog from '@/components/contactDialog/openContactDialog.vue';
   import { deepClone } from '@/utils';
 
@@ -864,8 +870,6 @@
           this.processingRequired = res.value;
         }
       });
-
-      this.getplannedReleaseRequire('planned_release_require');
     },
     methods: {
       // 获取
@@ -898,7 +902,7 @@
         this.$set(row, 'factoriesName', data.name);
       },
 
-      async getplannedReleaseRequire(code) {
+      async getPlannedReleaseRequire(code) {
         parameterGetByCode({ code }).then((res) => {
           if (res) {
             this.isReview = res.value == '1' ? true : false;
@@ -930,7 +934,7 @@
       },
       async open(val) {
         await this.getFactoryList();
-
+        await this.getPlannedReleaseRequire('planned_release_require');
         this.clientEnvironmentId =
           this.$store.state.user.info.clientEnvironmentId;
         this.factoriesId = this.$store.state.user.info.factoryId;
@@ -1452,6 +1456,7 @@
             this.form.timeDimensionPlanType = this.type;
             await this.getPlanCode();
             this.loading = true;
+
             let api = type == 'sub' ? saveAndRelease : temporaryPlanSave;
             api(this.form)
               .then((res) => {
@@ -1467,7 +1472,8 @@
             this.loading = true;
             let api = type == 'sub' ? saveAndRelease : temporaryPlanSave;
 
-            // return
+            console.log(type, this.isReview, this.form, '请求数据');
+
             api(this.form)
               .then((res) => {
                 this.$message.success('修改成功!');

+ 2 - 1
src/views/saleOrder/components/order-search.vue

@@ -556,7 +556,8 @@
             label: '不定向订单'
           }
         ],
-        loading: false
+        loading: false,
+        groupName: ''
       };
     },
     computed: {