2
3
lining преди 6 години
родител
ревизия
3e4c66be18
променени са 1 файла, в които са добавени 14 реда и са изтрити 2 реда
  1. 14 2
      src/dashoo.cn/frontend_web/src/components/oilsupplier/goodslist.vue

+ 14 - 2
src/dashoo.cn/frontend_web/src/components/oilsupplier/goodslist.vue

@@ -42,8 +42,9 @@
         </el-table-column>
         <el-table-column label="是否为制造商" width="100">
           <template slot-scope="scope">
-            <el-button type="primary" plain size="mini" v-if="scope.row.IsManufacturer == 2" @click="type_change(scope,canadd,newcanadd)" :disabled="(operType != '制造商')&& !(canadd || newcanadd)">非制造商</el-button>
-            <el-button type="primary" plain size="mini" v-if="scope.row.IsManufacturer == 1" @click="type_change(scope,canadd,newcanadd)" :disabled="(operType != '制造商')&& !(canadd || newcanadd)">制造商</el-button>
+            {{operType != '制造商'}}{{!(canadd || newcanadd)}}{{(operType != '制造商')&& !(canadd || newcanadd)}}
+            <el-button type="primary" plain size="mini" v-if="scope.row.IsManufacturer == 2" @click="type_change(scope,canadd,newcanadd)" :disabled="isDisabledBtn()">非制造商</el-button>
+            <el-button type="primary" plain size="mini" v-if="scope.row.IsManufacturer == 1" @click="type_change(scope,canadd,newcanadd)" :disabled="isDisabledBtn()">制造商</el-button>
           </template>
         </el-table-column>
         <el-table-column prop="CertSubStatus"
@@ -328,6 +329,17 @@ export default {
     }
   },
   methods: {
+    isDisabledBtn () {
+      if (this.operType !== '制造商') {
+        return true
+      } else {
+        if (this.canadd || this.newcanadd) {
+          return false
+        } else {
+          return true
+        }
+      }
+    },
     opendialog () {
       if (!this.isFirstOpen) {
         this.node_had.childNodes = []