huangbin 4 years ago
parent
commit
c53e5d84e2

+ 15 - 1
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_bargain/components/bargain_detail/index.vue

@@ -23,7 +23,8 @@
         </div>
         <a-row :gutter="24"
                type="flex"
-               justify="center">
+               justify="center"
+               v-if="isShowBtn()">
           <a-col :span="24"
                  class="fixedBtns">
             <a-form-item class="btnCenter">
@@ -83,6 +84,18 @@ export default defineComponent({
             haswr: 0,
             wrtradeorderid: props.selectedRow.wrtradeorderid,
         };
+        function isShowBtn() {
+            let result = true;
+            const len = tableList.value.length;
+            if (len) {
+                if (tableList.value[len - 1].applystatus !== 1) {
+                    result = false;
+                }
+            } else {
+                result = false;
+            }
+            return result;
+        }
         queryTable(queryQueryWrTradeBargainApply, param);
         // 我对别人的 => 撤销
         // 别人对我的 => 确认、拒绝
@@ -127,6 +140,7 @@ export default defineComponent({
             cancel,
             cancelAction,
             getBarmaginApplyStatus,
+            isShowBtn,
         };
     },
 });

+ 14 - 0
src/views/order/spot_warran/components/spot_warrant_bargain/components/bargain_detail/index.vue

@@ -23,6 +23,7 @@
         </div>
         <a-row :gutter="24"
                type="flex"
+               v-if="isShowBtn()"
                justify="center">
           <a-col :span="24"
                  class="fixedBtns">
@@ -84,6 +85,18 @@ export default defineComponent({
             wrtradeorderid: props.selectedRow.wrtradeorderid,
         };
         queryTable(queryQueryWrTradeBargainApply, param);
+        function isShowBtn() {
+            let result = true;
+            const len = tableList.value.length;
+            if (len) {
+                if (tableList.value[len - 1].applystatus !== 1) {
+                    result = false;
+                }
+            } else {
+                result = false;
+            }
+            return result;
+        }
         // 我对别人的 => 撤销
         // 别人对我的 => 确认、拒绝
         const { isMy, getColums } = getSpotWarrantBargainDetailColumns(props.selectedRow);
@@ -127,6 +140,7 @@ export default defineComponent({
             cancelAction,
             cancel,
             getBarmaginApplyStatus,
+            isShowBtn,
         };
     },
 });