Kaynağa Gözat

fix: 添加workOrderInfo属性到footBtn组件以支持动态按钮名称更新

xieyong 1 ay önce
ebeveyn
işleme
2af322b770

+ 8 - 1
src/views/produce/components/footBtn.vue

@@ -51,6 +51,10 @@
       activeName: {
         type: String,
         default: '0'
+      },
+      workOrderInfo: {
+        type: Object,
+        default: () => {}
       }
     },
     data() {
@@ -245,7 +249,7 @@
         ],
         btnList3: [
           {
-            name: '发货',
+            name: '入库',
             type: 'job',
             bjColor: '#157A2C'
           },
@@ -507,6 +511,9 @@
           if (v == '2' || v == '3' || v == '6') {
             this.$set(this, 'btnList', this.btnList2);
           } else if (v == '5') {
+            if(this.workOrderInfo.workOrderType === 3){
+              this.btnList3[0].name = '发货';
+            }
             this.$set(this, 'btnList', this.btnList3);
           } else {
             this.$set(this, 'btnList', this.btnList1);

+ 1 - 0
src/views/produceOrder/workReport.vue

@@ -265,6 +265,7 @@
                 :isSomeoneDisabled="isSomeoneDisabled"
                 :isSomeoneDisabledMsg="'无法操作'"
                 :activeName="activeName"
+                :workOrderInfo="workOrderInfo"
                 style="background: rgba(223, 250, 222, 0.6); padding: 10px"
               ></footBtn>
             </el-tab-pane>