소스 검색

no message

linwenxin 1 년 전
부모
커밋
9095434364
1개의 변경된 파일21개의 추가작업 그리고 1개의 파일을 삭제
  1. 21 1
      src/views/salesPurchasing/commercialMaterial/index.vue

+ 21 - 1
src/views/salesPurchasing/commercialMaterial/index.vue

@@ -638,7 +638,27 @@ export default {
               }
             })
           }
-        }
+        },
+        qiyjiny: {
+          name: ({ row, index, column }) => {
+            return row.state == "ON" ? "禁用" : "启用"
+          },
+          prompt: ({ row, index, column }) => {
+            return `是否${row.state == "ON" ? "禁用" : "启用"}?`
+          },
+          click: ({ row, index, column }) => {
+            goodsMaterialBatchUpdateStatus({
+              ids: row.id,
+              stateEnum: row.state == "ON" ? "OFF" : "ON"
+            }).then(res => {
+              this.$message({
+                type: 'success',
+                message: '设置成功'
+              })
+              this.$refs.pageRef.refreshList()
+            })
+          }
+        },
       })
     },
     openForm() {