Browse Source

修改组件删除按钮的显示规则

caojunjie 4 năm trước cách đây
mục cha
commit
1ceef0d4c1

+ 1 - 1
src/combination/listComponent.vue

@@ -77,7 +77,7 @@
             <span v-if="item.operation == 1">
               <el-button type="text" @click="viewMethod(scope)">查看</el-button>
 <!--              <el-button type="text" @click="modification(scope)">修改</el-button>-->
-              <el-button type="text" @click="deletion(scope)">删除</el-button>
+              <el-button type="text" @click="deletion(scope)" v-if="scope.row.fBillstatus > 3">删除</el-button>
             </span>
             <span v-if="item.operation == 2">
               <el-button type="text" @click="deleteRow(scope.$index, tableData)" :disabled="item.disabled">移除</el-button>

+ 4 - 2
src/views/purchaseIssue/index.vue

@@ -742,7 +742,7 @@ export default {
       let date = this.$route.query
       console.log(date)
       if (this.$route.query.list){
-        console.log(this.contentButton)
+        this.contentButton = this.$options.data().contentButton
         this.contentButton.push(JSON.parse(this.$route.query.list))
         console.log(this.contentButton)
         let scope = {
@@ -970,7 +970,7 @@ export default {
     addOrUpdateHand() {
       this.addOrUpdateVisib = true;
       this.$nextTick(() => {
-        this.$refs.ApprovalComments.init(this.$refs.avatar.form.fId,520);
+        this.$refs.ApprovalComments.init(this.$refs.avatar.form.fId,550);
       });
     },
     //详情内容保存
@@ -1040,6 +1040,8 @@ export default {
               item.disabled = false
             }
           })
+          this.contentButton.forEach(item => item.disabled = false)
+          this.contentStyle.forEach(item => item.disabled = false)
           // this.$refs.avatar.form.createBy = Cookies.get('userName')
           break
         case '保存':

+ 17 - 3
src/views/purchaseRequest/index.vue

@@ -269,6 +269,13 @@ export default {
           width: 100,
           onabort: ''
         },{
+          surface: '10',
+          label: 'fBillstatusName',
+          name: '状态',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },{
           surface: '11',
           label: 'operation',
           name: '操作',
@@ -746,7 +753,7 @@ export default {
       let date = this.$route.query
       console.log(date)
       if (this.$route.query.list){
-        console.log(this.contentButton)
+        this.contentButton = this.$options.data().contentButton
         this.contentButton.push(JSON.parse(this.$route.query.list))
         console.log(this.contentButton)
         let scope = {
@@ -982,6 +989,13 @@ export default {
           console.log(this.dataList, this.contentList)
           if (item == 1){
             this.dialogVisible = true
+          }else if (item === 2){
+            let data = {
+              tableName: this.queryList.tableName,
+              userId: Cookies.get('userName')
+            }
+            this.getRow(data)
+            this.query(this.formDataList)
           }
         }
       })
@@ -1090,7 +1104,7 @@ export default {
             this.getRow(data)
             this.query(this.formDataList)
           } else if(this.$route.query.data){
-
+            this.cancelTwo();
             this.$router.push({path:'/index'})
           }else {
             this.$confirm('当前数据未保存是否保存?', '提示', {
@@ -1098,7 +1112,7 @@ export default {
               cancelButtonText: '取消',
               type: 'warning'
             }).then(() => {
-              this.submitAndSave()
+              this.submitAndSave(2)
             }).catch(() => {
               data = {
                 tableName: this.queryList.tableName,