孤鹤 2 år sedan
förälder
incheckning
bc127e51cb

+ 9 - 9
src/views/tirePartsMall/basicData/supplier/components/index.vue

@@ -23,15 +23,15 @@
       @on-load="onLoad"
       @tree-load="treeLoad"
   >
-    <!--<template slot-scope="scope" slot="menu">-->
-    <!--  <el-button-->
-    <!--    type="text"-->
-    <!--    icon="el-icon-circle-plus-outline"-->
-    <!--    size="small"-->
-    <!--    @click.stop="handleAdd(scope.row, scope.index)"-->
-    <!--    >新增子项-->
-    <!--  </el-button>-->
-    <!--</template>-->
+    <template slot-scope="scope" slot="menu">
+     <el-button
+       type="text"
+       icon="el-icon-circle-plus-outline"
+       size="small"
+       @click.stop="handleAdd(scope.row, scope.index)"
+       >新增子项
+     </el-button>
+    </template>
   </avue-crud>
 </template>
 

+ 14 - 10
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -7,7 +7,7 @@
                 </el-button>
             </div>
             <div class="add-customer-btn">
-                <el-button class="el-button&#45;&#45;small-yh" style="margin-right: 10px" type="primary" size="small"
+                <el-button class="el-button&#45;&#45;small-yh" type="primary" size="small"
                     v-if="form.id" @click="confirmEditing">编辑
                 </el-button>
                 <el-button class="el-button--small-yh" type="primary" size="small" v-if="form.statusName != '已入库'"
@@ -33,18 +33,18 @@
                             @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 274.1)"
                             @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 274.1)">
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-                                <el-button :size="size" :disabled="disabled" :type="type"
+                                <el-button :size="size" :disabled="disabled || isEdit" :type="type"
                                     :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="rowEdit(row, index)">编辑
                                 </el-button>
                                 <el-button icon="el-icon-delete" :size="size"
-                                    :disabled="disabled || form.statusName == '已入库'" :type="type"
+                                    :disabled="disabled || form.statusName == '已入库' || isEdit" :type="type"
                                     @click="rowDelBox(row, index)">删除
                                 </el-button>
                             </template>
                             <template slot-scope="{scope,row}" slot="menuLeft">
                                 <el-button type="primary" icon="el-icon-plus" size="small" @click="rowAdd(row, score)"
                                     :disabled="isrowAdd">添加轮胎</el-button>
-                                <el-button type="success" size="small" icon="el-icon-bottom" @click="excelBox = true">导入
+                                <el-button type="success" size="small" :disabled="isrowAdd" icon="el-icon-bottom" @click="excelBox = true">导入
                                 </el-button>
                                 <el-button type="primary" icon="el-icon-printer" size="small"
                                     @click="handlePrint">打印</el-button>
@@ -107,6 +107,7 @@ export default {
     data() {
         return {
             switchDialog: false,
+            isEdit:false,
             activeName: "sale_detail",
             disabled: false,
             isrowAdd: true,
@@ -595,18 +596,20 @@ export default {
             console.log(2);
             this.refresh(this.onLoad.id, true)
         }
-        if (!this.onLoad.id) {
-            console.log(3);
-            this.isrowAdd = false
-            // this.$set(this.optionForm,'disabled',false)
-            // this.$set(this.optionContacts,'disabled',false)
-        }
         if (!this.form.id) {
+            this.isEdit = true
             console.log('这是一还是二');
             // this.$set(this.optionContactsBack, "addBtn", false)
             this['optionContacts'] = this['optionContactsBack'];
             this.delColumnData(this.getColumnName('269.1'), this['optionContactsBack']);
         }
+        if (!this.onLoad.id) {
+            console.log(3);
+            this.isrowAdd = false
+            this.isEdit = false
+            // this.$set(this.optionForm,'disabled',false)
+            // this.$set(this.optionContacts,'disabled',false)
+        }
     },
     components: {
         reportDialog
@@ -669,6 +672,7 @@ export default {
         //编辑
         confirmEditing() {
             if (this.form.statusName == '待入库') {
+                this.isEdit = false
                 this.isrowAdd = false
                 this.$set(this.optionForm, 'disabled', false)
                 this.$set(this.optionContacts, 'disabled', false)

+ 16 - 9
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -7,17 +7,17 @@
         </el-button>
       </div>
       <div class="add-customer-btn">
-        <el-button class="el-button&#45;&#45;small-yh" style="margin-right: 10px" type="primary" size="small"
-          v-if="!editButton" @click="confirmEditing">编辑
+        <el-button class="el-button&#45;&#45;small-yh"  type="primary" size="small"
+          v-if="editButton" @click="confirmEditing">编辑
         </el-button>
-        <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据
+        <el-button class="el-button--small-yh" type="primary" size="small" :disabled="isSave" @click="editCustomer">保存数据
         </el-button>
         <el-button class="el-button--small-yh" type="warning" size="small" v-if="form.statusName == '已出库'"
-          @click="revoke">撤销出库
+          @click="revoke" :disabled="isSave">撤销出库
         </el-button>
 
         <el-button class="el-button--small-yh" type="success" size="small" style="margin-left: 6px;"
-          v-if="form.statusName == '待出库' || form.statusName == '撤销出库'" @click="complete">出库完成
+          v-if="form.statusName == '待出库' || form.statusName == '撤销出库'" @click="complete" :disabled="isSave">出库完成
         </el-button>
       </div>
     </div>
@@ -80,6 +80,8 @@ export default {
     return {
       switchDialog: false,
       activeName: "sale_detail",
+      editButton:true,
+      isSave:true,
       disabled: false,
       isDisabled: false,
       isAddDisabled: false,
@@ -557,6 +559,7 @@ export default {
     confirmEditing() {
       if (this.form.statusName == '待出库' || this.form.statusName == '待入库'||this.form.statusName == '撤销出库') {
         this.isDisabled = false
+        this.isSave = false
         this.$set(this.optionForm, 'disabled', false)
         this.optionForm.column.forEach(item => {
           if (item.prop == 'storageId' || item.prop == 'remarks' || item.prop == 'createTime' || item.prop == 'stockClerkId') {
@@ -574,12 +577,16 @@ export default {
       } else {
         this.$set(this.optionForm, 'disabled', false)
         this.isAddDisabled = true
+        this.isSave = false
+        // this.optionForm.column.forEach(item => {
+        //   if (item.prop == 'remarks') {
+        //     item.disabled = false
+        //   } else {
+        //     item.disabled = true
+        //   }
+        // })
         this.optionForm.column.forEach(item => {
-          if (item.prop == 'remarks') {
-            item.disabled = false
-          } else {
             item.disabled = true
-          }
         })
         // this.isAddDisabled = false